Difference between revisions of "Basic Date Box Dynamic Modification"

From All n One's bxp software Wixi

Jump to: navigation, search
(Dynamic modification of the Question Basic Date Box)
 
(Dynamic modification of the Question Basic Date Box)
Line 5: Line 5:
 
* Modify the minute drop down list to have intervals i.e 15 minute intervals, 20 minute intervals or even 8 minute intervals
 
* 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.
 
* 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:
 
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
 
* bxp Question Id - Replace this with the '''strCDA_X_field_X_X''' identifier of the question
Line 12: Line 14:
 
* Hide seconds - to hide the seconds replace this with '''true''' otherwise replace this with '''false''' to leave the seconds in place
 
* Hide seconds - to hide the seconds replace this with '''true''' otherwise replace this with '''false''' to leave the seconds in place
  
== JavaScript function Call ==
+
== JavaScript Functional Call Examples ==
  
 
<syntaxhighlight lang="JavaScript">
 
<syntaxhighlight lang="JavaScript">
 
fn_General_ModifyCalendarSetting( 'bxp Question Id', Minute intervals, Hide seconds);
 
fn_General_ModifyCalendarSetting( 'bxp Question Id', Minute intervals, Hide seconds);
 
</syntaxhighlight>
 
</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
 
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
Line 22: Line 25:
 
fn_General_ModifyCalendarSetting( 'strCDA_602_field_0_0', 15, true);
 
fn_General_ModifyCalendarSetting( 'strCDA_602_field_0_0', 15, true);
 
</syntaxhighlight>
 
</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
 
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

Revision as of 06:47, 17 October 2014

All dates and times in bxp software is stored in Universal Date Time (UDT) format. yyyy-mm-dd hh:mm:ss, this format is normally unchangeable.

bxp users now have the ability to perform some modifications to the question type "Basic - Date Box", these modifications are:

  • 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
  • Minute intervals - Replace this with the desired intervals for the minutes drop down list
  • Hide seconds - to hide the seconds replace this with true otherwise replace this with false to leave the seconds in place

JavaScript Functional Call Examples

fn_General_ModifyCalendarSetting( 'bxp Question Id', Minute intervals, Hide seconds);


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);


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

fn_General_ModifyCalendarSetting( 'strCDA_602_field_0_0', 5, false);