How to autofill mrvs variable with signleline text
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2024 01:39 AM
In the catalog there are Q1 and Q2. Q1 is a yes/no type and Q2 is MRVS.
there are 3 variables in the MRVS.
If I select "yes" in the Q1 then some default text "text123" need to be filled in the 3rd variable in the multi row variable set. Can anyone help me with the script for this.
thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2024 03:49 AM
I used the following script in the variable set.
it works
function onLoad() {
var temp;
if (this) {
temp = this.cat_g_form.getValue('variable1');
} else {
//Native UI logic
temp = parent.g_form.getValue('variable');
}
if (temp.indexOf('yes') != -1) {
g_form.setVisible("q3", true);
g_form.setMandatory("q3", true);
g_form.setValue("q3", "hello");
}
}