form_set_answer ()
Function prototype | form_set_answer ( session, form_id, question_id , value{, option_id, event_id, form_close = true}) |
---|---|
API Version | All |
Updates the value of a question.The update of a question also triggers the following actions:
If the function returns Y in <refresh> param, is indication to the client for update the summary page. It depends of the calculated fields or conditional values/questions. | |
Input parameters: |
|
Output parameters: |
|
Request sample: | form_set_answer ( “LCAAAAAAAA”, 1234, 76665, “No”); |
Response sample: | <?xml version="1.0" encoding="UTF-8"?> <result> <?xml version="1.0" encoding="utf-8"?> <review_info> <form_complete>false</form_complete> <action_request/> <review> <first_question> <ref>105288Q1</ref> </first_question> <questions> <question> <question_id>105288Q1</question_id> <order>100000</order> <description_onedit>Question title</description_onedit> <num_dec/> <mandatory>N</mandatory> <exclusive>N</exclusive> <tabulation>0</tabulation> <description>Question title</description> <data_code/> <type>STATIC_TEXT</type> <is_section_title>true</is_section_title> <value/> <hidden>false</hidden> <literal_format/> <value_format/> <arrangement/> <editable>false</editable> </question> <question> <question_id>105288Q2</question_id> <order>200000</order> <description_onedit>Simple text</description_onedit> <num_dec/> <mandatory>N</mandatory> <exclusive>N</exclusive> <tabulation>0</tabulation> <description>Simple text</description> <data_code/> <type>TEXT</type> <value>hola</value> <hidden>false</hidden> <literal_format/> <value_format/> <arrangement/> <editable>false</editable> </question> <question> <question_id>105288Q3</question_id> <order>300000</order> <min_value/> <max_value/> <description_onedit>Numeric question</description_onedit> <num_dec/> <mandatory>N</mandatory> <exclusive>N</exclusive> <tabulation>0</tabulation> <description>Numeric question</description> <data_code/> <type>NUMERICAL</type> <value>34</value> <hidden>false</hidden> <literal_format/> <value_format/> <arrangement/> <editable>false</editable> </question> </questions> </review> </review_info> </result> <refresh>N</refresh> <!-- CALL form_get_summary () TO REFRESH QUESTION LIST --> <next>{form_id/}12</next> <!-- NEXT QUESTION THAT NEEDS TO BE ANSWERED --> <next_form>52343</next_form> <!-- FORM OF THE NEXT QUESTION --> <next_task>63425</next_task> <!-- TASK OF THE NEXT QUESTION --> <next_strict>{form_id/}11</next_strict> <!-- NEXT QUESTION NO MATTER IF IT NEEDS TO BE ANSWERED OR NOT --> <next_strict_form>52343</next_strict_form> <!-- FORM OF THE NEXT STRICT QUESTION --> <next_strict_task>63425</next_strict_task> <!-- TASK OF THE NEXT STRICT QUESTION --> <ErrorMsg></ErrorMsg> |
Notes: | In case of error, the Response will be different, only return a empty result and the Error: <?xml version="1.0" encoding="utf-8" standalone="yes"?> <result></result> <ErrorMsg>ERROR: Parámetros pasados están vacíos</ErrorMsg> |
, multiple selections available,