Buy Now
Sign in

Show/hide textarea based on other field value

SPABO , April 16 2017, 08:40
S
SPABO 639
April 16 2017, 08:40 #366982
Hi Max.

I followed the rules as in the demo form (Show/hide fields based on other fields values), but to my opinion it does not work with a textarea

Case:
I created a dropdown ( No vs Yes)
If "No"is selected the area must be hidden
If "yes" is selected, the area must be shown

FYI : I do it with a checkboxesgroup, it works fine

My question, does it work on your side, using the same rules?

Rgds
Kees
admin 28
April 16 2017, 09:28 #366987
Hi Kees,

What do you have the "Events" section of the dropdown ?

Best regards,
Max
Max
If your main question got answered then please mark the answer using the button!
Did you try the new ChronoForms7 ? if yes then please send us your comments!!
S
SPABO 639
April 16 2017, 09:35 #366988
Hi Max
Leave for waht it is, it's not workable to get a simply form in V6
I'm now getting errors
I deleted teh table, and wanted to create a new table, but this systems does not allow to create a table with a specific name
S
SPABO 639
April 16 2017, 11:29 #366989
Getting it working again..

Now back to the issue, pls find some pictures
Attachments
chrono.JPG
chrono.JPG
(45.74 KiB)
583 Downloads/Views
chrono3.JPG
chrono3.JPG
(24.51 KiB)
583 Downloads/Views
S
SPABO 639
April 16 2017, 12:00 #366991
Additionally
Working fine when using Radios Group and/or Checkboxes Group

Does not work (al least not here) with
Textfield and/or Textarea
admin 28
April 17 2017, 08:37 #367012
Hi Kees,

You should only have 2 events, one when "selecting" "y" to "show" the textarea, and another when "selecting" "n" to "hide" the textarea, but right now you have conflicting events, the 1st and the 4th for example.

Best regards,
Max
Max
If your main question got answered then please mark the answer using the button!
Did you try the new ChronoForms7 ? if yes then please send us your comments!!
S
SPABO 639
April 17 2017, 09:14 #367016
Hi Max,
Sorry, but this does not solve this.
I would be very pleased if yoy could show screendumps so I can check what I did wrong.

Look forward to see your solution

Best regards

Kees
GreyHead 64
April 17 2017, 09:30 #367018
Hi Kees,

I got this to work. Note that the Element identifier is .field #textarea2 - that is a CSS selector for the parent div of the textarea so that the whole element is hidden.

Bob
2017-04-17_11-27-27.png
Attachments
2017-04-17_11-27-27.png
2017-04-17_11-27-27.png
(34.46 KiB)
751 Downloads/Views
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
S
SPABO 639
April 17 2017, 10:02 #367021
Hi Bob
This does not work as wel, even when I put .fieldl#textarea31 (is the new area nbr)
Rgds
Kees
admin 28
April 17 2017, 10:18 #367023
Hi Kees,

Bug found, there is a problem when the target element is a "textarea".

I think Bob's code should work but you need to have a space here: .fieldl#textarea31 >
.field #textarea31


Best regards,
Max
Max
If your main question got answered then please mark the answer using the button!
Did you try the new ChronoForms7 ? if yes then please send us your comments!!
S
SPABO 639
April 17 2017, 10:34 #367026
Hi Max,

Took a couple of hours, but's that's the trick. How could I know???

Maybe foor the future, just to make it work on "taxtarea31" only.

Best regards
Kees

(more questions to come I'm afraid )
admin 28
April 17 2017, 12:22 #367028
 Answer
Hi Kees,

Yes, it should work with textarea31 only but since there is a bug, it didn't, for now you can use the code you have.

Best regards,
Max
Max
If your main question got answered then please mark the answer using the button!
Did you try the new ChronoForms7 ? if yes then please send us your comments!!
S
SPABO 639
April 20 2017, 17:43 #367207
 1
 Answer
Hi Max,
It works now correctly on the textfield/textarea!
Rgds
Kees
F
FransO 19
April 30 2017, 12:28 #367613
Hi Max,

I tried the same with radio buttons as the controlling element, but that did not work. Also when the target is a multi field area instead of a single field it does not work, neither with a dropdown nor with a checkboxes group as the controlling element.

Regards,
Frans
admin 28
May 01 2017, 07:08 #367623
Hi Frans,

What is the "Element identifier" ? if the target element does not have a "name" then you should use this:

#element_id

Best regards,
Max
Max
If your main question got answered then please mark the answer using the button!
Did you try the new ChronoForms7 ? if yes then please send us your comments!!
F
FransO 19
May 01 2017, 07:24 #367624
Hi Max,

Thanks, that worked and solved both problems. I feel kind of stupid for not knowing this simple solution. Should I have read this anywhere in the documentation or FAQ's?

Regards,
Frans
admin 28
May 01 2017, 08:25 #367627
Hi Frans,

No problems, unfortunately there are not any docs or FAQs for v6 yet, but I'm trying to solve this!

Best regards,
Max
Max
If your main question got answered then please mark the answer using the button!
Did you try the new ChronoForms7 ? if yes then please send us your comments!!