Changes

Basic Date Box Dynamic Modification

15 bytes added, 06:47, 17 October 2014
Dynamic modification of the Question Basic Date Box
* Modify the minute drop down list to have intervals i.e 15 minute intervals, 20 minute intervals or even 8 minute intervals
* Allows the user to choose to capture seconds in the time frame or not.
 
To use this functionality you must first add a question to your form of type "Basic - Date Box", once that is done make note of the strCDA_X_field_X_X identifier of the question. Next go to the JavaScript onLoad settings of your form and enter in the following JavaScript function call, replacing the following fields:
 
* bxp Question Id - Replace this with the '''strCDA_X_field_X_X''' identifier of the question
* Hide seconds - to hide the seconds replace this with '''true''' otherwise replace this with '''false''' to leave the seconds in place
== JavaScript function Functional Call Examples ==
<syntaxhighlight lang="JavaScript">
fn_General_ModifyCalendarSetting( 'bxp Question Id', Minute intervals, Hide seconds);
</syntaxhighlight>
 
Below is an example of a functional call that will set the question '''strCDA_602_field_0_0''' to have a minute intervals of 15 minutes and also hide the seconds
fn_General_ModifyCalendarSetting( 'strCDA_602_field_0_0', 15, true);
</syntaxhighlight>
 
Below is an example of a functional call that will set the question '''strCDA_602_field_0_0''' to have a minute intervals of 5 minutes and also show the seconds