This may go without saying but for your question to work offline it cannot be dependent on any remote resources (i.e. jquery libraries, images, etc) and the question should be created with the HTML (i.e. source code) option instead of the URL option.
Returns the current answer
VALUE string. This is where you can do calculations, formatting, etc. to ready the answer for collection.
This function is responsible receiving the answer
VALUE from the app and loading it into your Custom Question UI.
Sends the answer to the app by firing a location load event (i.e.
window.location = codereadr:answerForCR:NEW_ANSWER_VALUE) that the app will consume. You do not have to modify this function but it should be called anytime the answer value changes or to set a default answer.
A boolean function that returns false if the current answer is invalid and should prevent the user from submitting the scan. By default you should return
true. Only return
false if you are validating the answer and want to block scan submit when the answer is not valid.
You will either be creating the question by supplying a URL to the question page or the actual source code of the question page.
- Create a question of type
webcollectand keep track of the returned codeREADr question ID.
- Add an answer option to the question by setting
question_idto the returned ID and setting the
answer_textto either your implementation's URL wrapped in a
curltag or the HTML source code directly.