Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
en:create:inputs-custom [06.01.2015 20:48] – [Use Custom Form Elements] alexander.ritteren:create:inputs-custom [06.01.2015 20:53] – [Limitations] alexander.ritter
Line 38: Line 38:
 There are two major limitations when using custom form elements: There are two major limitations when using custom form elements:
  
-  - The meaning of the response code will not be saved in the data record. Whereas in a typical selection question, code 1 could be "student" and code 2 could be "employee", you have to keep an eye on this yourself when a custom form element is used. +  - The meaning of the answer code will not be saved in the data record. Whereas in a typical selection question, code 1 could be "student" and code 2 could be "employee", you have to keep an eye on this yourself when a custom form element is used. 
   - Making a response compulsory can be implemented with a [[:en:create:checks#individuelle_antwort-pruefung|Customized Response Check]]   - Making a response compulsory can be implemented with a [[:en:create:checks#individuelle_antwort-pruefung|Customized Response Check]]
   - If you want to give the participant the option of using the Back button, or if the page should be shown again if information is incomplete, you have to ensure that your form element shows a response given previously. In order to do so, you can read the value with ''[[:en:create:functions:value|value()]]'' and insert placeholders into the HTML code for the question.    - If you want to give the participant the option of using the Back button, or if the page should be shown again if information is incomplete, you have to ensure that your form element shows a response given previously. In order to do so, you can read the value with ''[[:en:create:functions:value|value()]]'' and insert placeholders into the HTML code for the question. 
Line 147: Line 147:
 The solution outlined above assumes that the value from the custom input element (''<input>'' or ''<select>'') will be submitted into the data record. The solution outlined above assumes that the value from the custom input element (''<input>'' or ''<select>'') will be submitted into the data record.
  
-However, it is possible that you do not want to create this type of input field at all, and wish to determine the value using JavaScript instead, and submit this value into the data record. Two changes are necessary if this is the case:+However, it may be the case that you do not want to create this type of input field at all, and want to determine the value using JavaScript instead, and submit this value into the data record. Two changes are necessary if this is the case:
  
   - Remove ''prepare_input()'' from the questionnaire page.   - Remove ''prepare_input()'' from the questionnaire page.
en/create/inputs-custom.txt · Last modified: 17.03.2021 20:46 by sophia.schauer
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki