- FilipAsked on January 17, 2012 at 07:43 AM
I need to show/hide some fields on my form basing on arguments passed in query string e.g. if formUrl?showName=true then show name textbox, otherwise hide it.
In form`s conditional logic I tried to use hidden boxes that were prepopulated by those URL params but this doesn't work, as per thread:
Is there any other solution than the one presented in the linked thread?
- fxrAnswered on January 17, 2012 at 04:57 PM
OK, I can see what your problem is now.
Even though we may be able to help with the scripts, it is still quite a lot of work.
I am trying to think why the solution offered by Neil in that thread wont work for you?
Are you able to create some kind of fuller prototype of how your final form will look? and we will have a thought about whether or not some version of Neils solution is something that we could use.
- FilipAnswered on January 18, 2012 at 05:15 AM
We host our own instance of JotForm - maybe we could introduce a code change to the JotForm source that would allowe that? It's much more convinient than modyfing code of each form we create.
If this is possible, please advise how.
My main issue with the solution suggested by Neil is that I would need to create a separate page for each parameter combination. In my form I have 25 fields and currently only 1 needs to be shown/hidden basing on the url param value. Using this solution I would have to recreate 24 fields on another page.
What would happen if on the same form I had 2 fields whose visibility depends on different url params - I would need to create 4 pages, each containing at least 23 fields.
- JotForm SupportMike_TAnswered on January 18, 2012 at 05:21 PM
Please note that you can also put all the hidden questions to page 2 (related to Neil's solution), and other visible fields to page 3.
Please give it a try, and let us know if you need any further assistance.
- JotForm SupportMike_TAnswered on January 18, 2012 at 05:28 PM
I would like to add that you do not have to re-create the fields. According to Neil's condition, all the "page 2" will be skipped.
- FilipAnswered on January 19, 2012 at 02:45 AM
The problem is that I need to display all the fields on the same page. I would only use pages to implement this showe/hide functionality.
The end user should always see a single page and there should be no need for clicking 'Next' button at any time.
It seems it's not achievable with current version. Can you advise the necessary code changes?
- fxrAnswered on January 19, 2012 at 04:40 AM
The developers are unlikely to offer bespoke code for your installation to help you attain this specifc functionality.
- youthencounterAnswered on November 09, 2012 at 02:05 PM
I know this thread is old, but I was looking for a solution to this as well, found this thread, and then came up with a better work around.
You can use the conditional show/hide method of individual fields if you pass in a paramater to a radio box field.
Then you can hide the radio box field with CSS.
- JotForm SupportEduardoMendezAnswered on November 09, 2012 at 02:15 PM
Thanks for sharing this with us!
We appreciate the workaround and will be sharing it with others.