I will need a select box with the following selections:
10=Individual
15=Family
100=Patron
300=Patron King
500=Patron Master
1000=Patron Grandmaster
If Individual is selected nothing else needs to happen.
If Family is selected, a text box appears asking how many members. Needs to only accept up to two numbers.
If any of the patron selections are made, a question appears with two radio boxes asking if they will be registering any family members. If yes is selected on the one radio box, then the text box appears as for the Family selection. If no is selected, nothing else needs to happen.
When I say nothing else needs to happen, the user will be completing the rest of the form which does not need any JS.
I don't need a submit button as the form processor I'm using (ChronoForms) already provides this.
I didn't see a way to edit the post so I'm afraid I am reposting. To make this simpler, is there a way to have a text box appear or be activated if either the family or any patron membership is selected? Skip all the other stuff I was asking about.
1- Create the form with all of the possible elements visible.
2- Place wrappers around everything that will be hidden at one time or another
3- Update your CSS to hide the things that will start off hidden
4- To your select box, add
function selMembership(selectedItem) {
if (selectedItem.value == '15'){
//do something like
//document.getElementById('theRadioButtonsWrapper').style.display = 'inline'
}
}
Bookmarks