mercredi 8 novembre 2017

XML Based survey - Textbox on click of a checkbox

We work on a survey scripting platform which runs mainly on XML and also supports JS and CSS.

Here is what I'm looking to achieve - I have a multi-select checkbox question with 5-6 options and when any of these checkboxes, a open-end (text entry box) should appear next to it.

Here is how the question looks in XML:

<checkbox 
label="q0"
atleast="1">
<title>Here are the details, would you to update any of the following?
</title>
 <row label="r1">First Name: ${fn}</row>
 <row label="r2">Last Name:${ln}</row>
 <row label="r3">Income: ${inc1}</row>
 <row label="r4">Ethnicity: ${eth}</row>
 <row label="r5">Education: ${edu}</row>
 <row label="r6">Employment: ${emp}</row>
 <row label="r7">Marital Status: ${mar}</row>
 <row label="r8">State: ${sta}</row>
 <row label="r9">Zip Code: ${zip}</row>
</checkbox>

So if row label "r1" is check the browser should dynamically show a textbox next to it.

I know that these kind of questions are asked by other users and also have been answered. I'm very new to this and would want help on how this can be implemented when we are using XML as a the base.

Regards, Madan




Aucun commentaire:

Enregistrer un commentaire