Forums
>
Product Discussion - DotNetNuke Modules
>
Dynamic Forms
Hiding Field Label using js
Last Post 07-23-2010 07:38 AM by Michael Cunningham. 2 Replies.
Author
Messages
Michael Cunningham
wading in the water
Posts:22
07-23-2010 06:57 AM
I've got a form that includes a dropdown "Select # of Players" with choices 1,2,3,4.
I have a corresponding set of fields for the playyers names
Player 1
Player 2
Player 3
Player 4
I want to dynamically turn on and off the player names field based upon the value of the dropdown. I can turn off the textboxes themselves by using:
------------
function test(){
hi($(Golfer1_FieldID));
}
function hi(controlId)
{var control = document.getElementById(controlId);
//control.disabled = true;
control.style.visibility = 'collapse';
}
function si(controlId)
{var control = document.getElementById(controlId);
//control.disabled = true;
control.style.visibility = 'visible';
}
------
but this only turns off the textbox but not the label.
Is there any way to replicate the built in show hide functionality using JS?
Michael
Candace
river guide
Posts:2431
07-23-2010 07:36 AM
How about using Question Events to hide/display fields based on the dropdown selection?
Edit the fields and in Advanced Field Options, check the 'hide until forced visible by a question event.' Then go to Question Events and create an event for each selection with the right affected fields.
Thanks!
Candace
Michael Cunningham
wading in the water
Posts:22
07-23-2010 07:38 AM
Candace,
I'm running other JS code on the event as well that cant be accomplished using client side events. And its been my experience that the 2 don't work well together.
Michael
Forums
>
Product Discussion - DotNetNuke Modules
>
Dynamic Forms
film izle
720 izle
film
sinema izle
film makinesi
T�rk�e dublaj film
film izle
film izle
baglan film izle
sinema izle
1080 film izle
film mercegi