How to hide/show control along with its label on Add/Edit pages |
1/9/2014 10:43:53 PM |
PHPRunner Tips and Tricks | |
admin
PHPRunner manual comes with example of hiding/showing controls on Add/Edit pages based on another control value: var ctrlCountry = Runner.getControl(pageid, 'country');
|
|
A
|
Anapolis 3/8/2014 |
PHPRunner manual comes with example of hiding/showing controls on Add/Edit pages based on another control value: http://xlinesoft.com/phprunner/docs/show_dropdown_list_of_us_states.htm For better user experience you may want to hide field label as well. Here is the sample code. This code will work with PHPRunner 7.0 and single column Add/Edit page layout. var ctrlCountry = Runner.getControl(pageid, 'country');
var ctrlMailout = Runner.getControl(pageid, 'mailout'); |
A
|
Abul 5/9/2014 |
The initial state is HIDE, right? So when the page is loaded the "state" page object, a dropdown selector of different US states, should not appear at all. I could not get this to work correctly until I made some revisions to this example. I have a Yes or No, Ja oder Nein, radio button that by default was checked "Ja" and the field was named "Mailout". If the button is changed to "Nein" then the Hidden row with the date selector field named "specialmail" appears. If the user changes their mind and decides to re Select "Ja" then the Date field below disappears again. My code is essentially the same code as the Example but presets the HIDE state first. var ctrlMailout = Runner.getControl(pageid, 'mailout');
|