Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

How to validate the scripting code for onclick process. So how to do this.

Like we have a numeric question and a single select question  both on a single page with a don’t know option should be radio type and if it is selected, response in the numeric should be erased. Likewise if something is entered in numeric box, radio button should be reset.
asked Oct 4 by Shub

1 Answer

0 votes
Look to the Question Library and you will find the "Not Applicable Per Question" option.

https://sawtoothsoftware.com/resources/question-library/not-applicable-per-question

This should assist you.

The instructions / details are listed here.
answered Oct 4 by Paul Moon Platinum (94,725 points)
Sorry this XML file is not getting imported. So if u can please give me the code or something that would be great.
You need to click the blue download button.

A ZIP file will be downloaded on your local device.

You then to to open the Lighthouse Studio and import the ZIP file via the Question Library.

The new question type (Not Applicable) will now appear in your very own question library.
Yes after that what to do ? Can you please guide me .
1/ Once you are in Lighthouse Studio, click on the Library button at the top.
2/ Click Import.
3/ Browse for your downloaded ZIP file.
4/ You should now have the "Not Applicable" question sitting in your Lighthouse studio.

You will also need to download an additional tool (Better Lighthouse Library) ...

https://sawtoothsoftware.com/resources/question-library/better-lighthouse-library

Perform the same import steps to import this in to your Lighthouse Studio.

Now follow the steps provided on the "Not Applicable" question website.
Sorry i downloaded everything and imported but it is not working. what i tried is this
<script>
function SSI_CustomGraphicalRadiobox(GraphicalRadioboxObj , InputObj)
{
    if(InputObj.name == "B1a_1")
    {
    SSI_SetSelect("B1", false;)
    }
}

Please help me out .
I will contact Zachary to chip in here. He is the creator of this feature and will be able to assist with your queries.
Just a further comment ...

Try using a check box rather than a radio button.
You don't need to add your own script.  "Not Applicable: Per Question" comes with all the JavaScript it requires to achieve this functionality.

If you were going to add such a script, though, you'd need to replace SSI_CustomGraphicalRadiobox / SSI_CustomGraphicalCheckbox.  Those functions are incompatible with the "Better Lighthouse Library."
...