Skip Navigation

[Resolved] "if yes" function in form

This support ticket is created 3 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 1.70 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Tagged: 

This topic contains 18 replies, has 2 voices.

Last updated by Luo Yang 3 years, 8 months ago.

Assisted by: Luo Yang.

Author
Posts
#1966045

Hi there,
I have a form that the host needs to fill out in order to create a camp. I need a function where the host checks off:
"Is the camp including a sleep over?"
If yes --> another field appears that says "What do you need to bring?"
If no ---> Nothing happens and the field just says no.

#1966301

Hello,

I assume we are talking about a post form created with Toolset Forms plugin, you can follow our document to setup the conditional display:
https://toolset.com/documentation/programmer-reference/forms/cred-conditional-display-engine/
Advanced Conditional Display for Form Sections

#1967199

Okay so what I want is the "Overnatning" field in the form to show up if "Yes" is checked. So I added the Conditional Group and put the "overnatning" field into the group. Then i added 2 checkboxes - 1 that says "Yes" and 1 that says "No". Now i dont know what to do to make the "overnatning" field appear to be filled out if Yes and hide the "overnatning" field if No.

Can you help?

Thanks.

#1967553
conditional-group.JPG

I assume we are talking about the post form "Create camp" in your website:
hidden link

There isn't field "Is the camp including a sleep over?" in it.

I have done below modifications in your website:
1) Add a custom radio field "Is the camp including a sleep over?" in post field group "Info about the camp":
hidden link

2) Edit the post form "Create camp":
hidden link
- Add field "Is the camp including a sleep over?"
- Add "Conditional Group", setup the condition, see my screenshot conditional-group.JPG
- Drag/drop the "Overnatning" field into above "Conditional Group"

3) Create a page, display above post form:
hidden link
It works fine, please check if it is what you want, thanks

#1969063

Wow thank you! It works perfectly!

#1969065

My issue is resolved now. Thank you!

#1969125

hi again ,
Is it possible to add a search filter to the search form "Search for badminton camps" where you can choose whether you want camps with sleep over or not? So the search filter could have a title like "sleep over" and then a drop down with "yes" and "no" and then it works as a filter for the camps too?

New threads created by Luo Yang and linked to this one are listed below:

https://toolset.com/forums/topic/add-a-search-filter-to-the-search-form/

#1969973

I assume the original question of this thread is resolved, for the new questions, please check the new thread here:
https://toolset.com/forums/topic/add-a-search-filter-to-the-search-form/

#1971427

Hi there,
Yes it was solved ! Ill start a new ticket

#1971431

hi agian,
I forgot - regarding this - that the field should show up on the template "Template for camps - final". Is it possible to set up the field in the template so the customer can see what the kids need for the sleepover if the host chose "yes" during the creating of the camp? And if the host chose "no" it should just say "No" or maybe be a hidden field?

#1971775

Yes, you can display the custom field with Toolset single field block, I have setup a demo in your website:
hidden link

Test it in front-end:
hidden link
hidden link

It works fine.

#1975441

Hi lou,

Thanks i see that it works!
So both fields will be visible even though the "Sleepover field" is set to no?

Also - i can not access the option of answering on the other support ticket we have going with Taxonomies. I have no option to answer your comment. Can you see what is wrong?

#1975509

Q1) So both fields will be visible even though the "Sleepover field" is set to no?
Are you going to do not display "Sleepover field" when it's value is "not"?
If it is, please try Toolset conditional block, see our document:
https://toolset.com/course-lesson/using-toolset-conditional-block/

Q2) i can not access the option of answering on the other support ticket we have going with Taxonomies
Are we talking about this ticket?
https://toolset.com/forums/topic/parent-category-taxonomy/

In my side, I don't see any problem in that ticket, please try these:
1) Clear your browser cache and test again
2) if the problem still persist, please take a screenshot for it

#1977609

Hi Lou,

I think the answer function is working again for now. I will try the conditional block in the content template.

#1977957

Please update here if you need more assistance for it.