Combobox Condition
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/forms.html
http://www.wysiwygwebbuilder.com/form_wizard.html
Frequently Asked Questions about Forms
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/forms.html
http://www.wysiwygwebbuilder.com/form_wizard.html
Frequently Asked Questions about Forms
Combobox Condition
hi there,
I need to create a combobox with multiple selection of number of participants. When a user select the number from the combobox, I want a correct number of edit box to show. For example, if a user select 5 participants from the combobox, then 4 edit boxes will display below it for user to complete the names according to the number of participants they selected. I tried to set conditions in the combobox, but no luck. Please advise what should i do? Thanks.
I need to create a combobox with multiple selection of number of participants. When a user select the number from the combobox, I want a correct number of edit box to show. For example, if a user select 5 participants from the combobox, then 4 edit boxes will display below it for user to complete the names according to the number of participants they selected. I tried to set conditions in the combobox, but no luck. Please advise what should i do? Thanks.
Re: Combobox Condition
You should be able to do this with conditions.
Related tutorial:
http://wysiwygwebbuilder.com/conditions.html
Related tutorial:
http://wysiwygwebbuilder.com/conditions.html
Re: Combobox Condition
Hi pablo,Pablo wrote: ↑Mon Sep 17, 2018 8:53 am You should be able to do this with conditions.
Related tutorial:
http://wysiwygwebbuilder.com/conditions.html
I m not after calculation. I need the numbers of editboxes to appear to user base on their choice
Re: Combobox Condition
You can also use conditions to show/hide other objects based on the selected value.
Alternative, you can use events. But then you will need to add custom code to implement the conditions.
Alternative, you can use events. But then you will need to add custom code to implement the conditions.
Re: Combobox Condition
I tried but no success. .
I created the following.
I have selection of 1, 2, 3. When user select 3, I want 3 edit boxes to appear so the user could enter. If user then select 2 then only edit boxes appear. Could you please give me some advise how to assign the conditions. Thanks.
Re: Combobox Condition
I'm sorry, I do not have a standard solution for this. This will require a script.
In the next update I will add support for different actions with the same value.
In the next update I will add support for different actions with the same value.
Re: Combobox Condition
If you've only got a few options e.g. 3, you could use a list of Radio Buttons and for each one use Events > Add > onclick > show > target editbox(es).
E.g. Radio Button 3 would have 3 show events - Editbox1, Editbox2 and Editbox3
You might want a 0 Radio Button to clear all 3 editboxes by using 3 Hides e.g.
Just an idea.
EDIT:
DOH! Just realised you can do it with a Combobox using the built-in conditions as Pablo said.
E.g. Radio Button 3 would have 3 show events - Editbox1, Editbox2 and Editbox3
You might want a 0 Radio Button to clear all 3 editboxes by using 3 Hides e.g.
Just an idea.
EDIT:
DOH! Just realised you can do it with a Combobox using the built-in conditions as Pablo said.
Re: Combobox Condition
I can get it to show depend on the choices. But i can't hide when different choices is made. For example. After you selected 4, 4 editboxes appear then you decided to change your choice to 3, it still showig 4 edit boxes.WWBman wrote: ↑Mon Sep 17, 2018 10:51 am If you've only got a few options e.g. 3, you could use a list of Radio Buttons and for each one use Events > Add > onclick > show > target editbox(es).
E.g. Radio Button 3 would have 3 show events - Editbox1, Editbox2 and Editbox3
You might want a 0 Radio Button to clear all 3 editboxes by using 3 Hides e.g.
Just an idea.
EDIT:
DOH! Just realised you can do it with a Combobox using the built-in conditions as Pablo said.
Re: Combobox Condition
On the 3 event did you hide editbox4?
Re: Combobox Condition
The following are the conditions i have set
no selection hide AdultName1
no selection hide AdultName2
no selection hide AdultName3
no selection hide AdultName4
Showing Adult Name 1
equal to (choice) Show AdultName1
Showing Adult Name 2
equal to Show AdultName1
equal to (choice) Show AdultName2
Showing Adult Name 3
equal to Show AdultName1
equal to Show AdultName2
equal to (choice) Show AdultName3
Showing Adult Name 4
equal to Show AdultName1
equal to Show AdultName2
equal to Show AdultName3
equal to (choice) Show AdultName4
no selection hide AdultName1
no selection hide AdultName2
no selection hide AdultName3
no selection hide AdultName4
Showing Adult Name 1
equal to (choice) Show AdultName1
Showing Adult Name 2
equal to Show AdultName1
equal to (choice) Show AdultName2
Showing Adult Name 3
equal to Show AdultName1
equal to Show AdultName2
equal to (choice) Show AdultName3
Showing Adult Name 4
equal to Show AdultName1
equal to Show AdultName2
equal to Show AdultName3
equal to (choice) Show AdultName4
Re: Combobox Condition
If you want the user to be able to click e.g. 3 after they have already clicked 4 then you will have to add events to Hide option editbox4 e.g.
BTW I'm not sure what the difference is between "Equal to" and "Equal to (choice)" but I don't think it's relevant here anyway.
BTW I'm not sure what the difference is between "Equal to" and "Equal to (choice)" but I don't think it's relevant here anyway.
Re: Combobox Condition
Still doesn't work. anyone has any idea why it can't hide when different selection is made?WWBman wrote: ↑Mon Sep 17, 2018 11:46 am If you want the user to be able to click e.g. 3 after they have already clicked 4 then you will have to add events to Hide option editbox4 e.g.
BTW I'm not sure what the difference is between "Equal to" and "Equal to (choice)" but I don't think it's relevant here anyway.
Re: Combobox Condition
Because currently you can only have one action per choice. So, when using the same value multiple times, the next choice will undo the previous choice.Still doesn't work. anyone has any idea why it can't hide when different selection is made?
In the next update (planned for later this year) you will be able to use multiple conditions with the same value.
Re: Combobox Condition
Thanks Pablo. Would you be able to suggest me an alternative solutions for now?Pablo wrote: ↑Mon Sep 17, 2018 12:14 pmBecause currently you can only have one action per choice. So, when using the same value multiple times, the next choice will undo the previous choice.Still doesn't work. anyone has any idea why it can't hide when different selection is made?
In the next update (planned for later this year) you will be able to use multiple conditions with the same value.
Re: Combobox Condition
It works with Radio Buttons but not (currently) for Comboboxes.
E.g. http://www.mediafire.com/file/as7v9n29p ... s.wbs/file
@petejos, are you using Radio Buttons or Comboboxes?
E.g. http://www.mediafire.com/file/as7v9n29p ... s.wbs/file
@petejos, are you using Radio Buttons or Comboboxes?
Re: Combobox Condition
The only alternative I can think of, is using events as described by WWBmanWould you be able to suggest me an alternative solutions for now
Re: Combobox Condition
I am using combo boxes. What would you recommend.WWBman wrote: ↑Mon Sep 17, 2018 12:23 pm It works with Radio Buttons but not (currently) for Comboboxes.
E.g. http://www.mediafire.com/file/as7v9n29p ... s.wbs/file
@petejos, are you using Radio Buttons or Comboboxes?
Re: Combobox Condition
As Pablo says you can only have one action per choice in a Combobox, but in the next update (planned for later this year) you will be able to use multiple conditions with the same value.
Have you downloaded my test project? It uses Radio Buttons and seems to do what you want.
http://www.mediafire.com/file/as7v9n29p ... s.wbs/file
Have you downloaded my test project? It uses Radio Buttons and seems to do what you want.
http://www.mediafire.com/file/as7v9n29p ... s.wbs/file
Re: Combobox Condition
Yeap, I downloaded your project. Thanks. I guess I just have to use that method for now. Thanks.WWBman wrote: ↑Tue Sep 18, 2018 7:41 am As Pablo says you can only have one action per choice in a Combobox, but in the next update (planned for later this year) you will be able to use multiple conditions with the same value.
Have you downloaded my test project? It uses Radio Buttons and seems to do what you want.
http://www.mediafire.com/file/as7v9n29p ... s.wbs/file
Re: Combobox Condition
It's just occurred to me that when you click e.g. 2 after clicking 3 (and filling in 3) then although the editbox will be hidden the entry for 3 will still be sent in the email so I've added a bit of Javascript (in Page HTML) to clear the relevant boxes.
So I would download the project again to get the improved version.
So I would download the project again to get the improved version.
Re: Combobox Condition
I think I found a solution for now. I insert the editboxes in layout grids. Meaning if I need to have 5 choice, 1st layout grid will have 1 edit box, 2nd layout grid will be 2 edit boxes, etc. until 5 layout grids are created. Then then send the condition in combobox.WWBman wrote: ↑Tue Sep 18, 2018 9:03 am It's just occurred to me that when you click e.g. 2 after clicking 3 (and filling in 3) then although the editbox will be hidden the entry for 3 will still be sent in the email so I've added a bit of Javascript (in Page HTML) to clear the relevant boxes.
So I would download the project again to get the improved version.
www.goec.com.au/goec2/page3.php
I tested and it work for me so far. Any comment?
Re: Combobox Condition
Did you test the scenario I mentioned in my previous post?
I.e. the user fills in e.g. 5 boxes and then changes their mind and changes to e.g. 3 boxes.
Were boxes 4 and 5 excluded in the email?
I.e. the user fills in e.g. 5 boxes and then changes their mind and changes to e.g. 3 boxes.
Were boxes 4 and 5 excluded in the email?
Re: Combobox Condition
Not yet tested yours. However my desired design is still combo box.
Re: Combobox Condition
Re: Combobox Condition
Hi wwbman, you are right. They are not excluded in the email if they change the choices.
Re: Combobox Condition
hi wwbman
How does this javascript works?
clearbox2();
The name of my editbox is "camper1name"
How does this javascript works?
clearbox2();
The name of my editbox is "camper1name"
Re: Combobox Condition
btw, I just tested and your javascript does not work. What went wrong? any idea?
Re: Combobox Condition
My test version does work. What are you seeing that doesn't work?
You'll find the clearboxn(); routines in Page HTML under Before </body>.
They simply clear the relevant editbox.
Just replace my editbox names e.g. indexEditbox1 with yours e.g. camper1name
You'll find the clearboxn(); routines in Page HTML under Before </body>.
They simply clear the relevant editbox.
Just replace my editbox names e.g. indexEditbox1 with yours e.g. camper1name
Re: Combobox Condition
When i tried yr version, firstly i choose 3 then enter details then i chooee 1 and submit. The result i received are still 3.
Re: Combobox Condition
In a previous post I mentioned this.
Did you download the new version?
Did you download the new version?
Re: Combobox Condition
Sorry but it works for me.
Can you share your .wbs file to see if I can spot any problem?
Can you share your .wbs file to see if I can spot any problem?
Re: Combobox Condition
My apology. I made some errors and now it is working.
btw, I need to unchecked a box when a different selection is made. For example, when a selection is made, i need one of the checked box in my form to be unchecked.
Re: Combobox Condition
I think you can uncheck a box with e.g. nameofRadioButton.checked = false;
Re: Combobox Condition
Try:
document.getElementById('Combobox1').options.length = 0;
or just:
Combobox1.options.length = 0;
document.getElementById('Combobox1').options.length = 0;
or just:
Combobox1.options.length = 0;
Re: Combobox Condition
Try:
Combobox1.reset();
Combobox1.reset();
Re: Combobox Condition
As you probably gathered I'm not a Javascript expert!!
If the user is selecting one item then try:
Combobox1.selectedIndex = 0;
If the user is selecting one item then try:
Combobox1.selectedIndex = 0;
Re: Combobox Condition
Hi WWBman, i would like to know how did you hide your editboxes on loading?petejos wrote: ↑Tue Sep 18, 2018 12:59 amI am using combo boxes. What would you recommend.WWBman wrote: ↑Mon Sep 17, 2018 12:23 pm It works with Radio Buttons but not (currently) for Comboboxes.
E.g. http://www.mediafire.com/file/as7v9n29p ... s.wbs/file
@petejos, are you using Radio Buttons or Comboboxes?
Re: Combobox Condition
In the Object Manager untick Visible.
Re: Combobox Condition
Did you set the onclick event to Show?
See my test project.
See my test project.
Re: Combobox Condition
Does it work as a standard form instead of a layout grid form?
If so then I have no idea what the problem is.
Have you double checked all the id names in the events etc.?
If so then I have no idea what the problem is.
Have you double checked all the id names in the events etc.?
Re: Combobox Condition
I've just tested it with a Layout Grid form and it seems to work.
Re: Combobox Condition
I guess you've seen Pablo's reply here:
viewtopic.php?f=5&t=82640&sid=78c960302 ... e9d75bf6ba
FWIW: I've updated my test project to reflect this.
viewtopic.php?f=5&t=82640&sid=78c960302 ... e9d75bf6ba
FWIW: I've updated my test project to reflect this.