Start a new topic

Dynamically Change Upload Form

CodeGrinder @ Tue Sep 16 13:03:22 EEST 2014
Is it possible to change which form is displayed based on a cookie / session variable? For example sometimes we require the same user to submit a documents using Form-1, but other times they will need to use Form-2. They are always notified via email that they need to submit documents. In the link they click on some variables are passed to them. https://example.com/?id=1234, so I am wondering if can also pass a variable like form=Form-2, which will then prompt them for the alternate form to be displayed?

spinkb @ Wed Sep 17 04:25:20 EEST 2014
A single form can be dynamically changed based on a drop down...so the entire form can change based on the selection.

Would that work?
CodeGrinder @ Wed Sep 17 12:12:00 EEST 2014
Actually yes, that would work great for this. How do I go about setting that up?
spinkb @ Wed Sep 17 12:16:55 EEST 2014
Have a drop-down that has a name ending with "_cascade". Now the drop-down's elements when chosen will effect the other elements later on in your overall from.


So, let’s say you have a drop-down called “order_form_cascade” and then create three options within that drop-down called, “poster”, “photo_prints”, and “generic”.


Then the following from elements have names like below:

item1_poster
item2_poster
item3_poster
item4_poster
Item5 <----is always shown since it has no matching tag on the end of it.
item6_photo_prints
item7_photo_prints
item8_generic
item9_generic
item10_generic
etc.

Its the end of the form element name that tags it to be hidden with the cascade functionality.

--Ben
CodeGrinder @ Tue Sep 23 11:18:53 EEST 2014
That is exactly what I needed. Thanks Ben! what a great feature. I am always telling my colleagues and friends about how amazing CrushFTP is.
Login to post a comment