- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2018 04:17 AM
Hi,
I have an URL field, and need to set that field value in ONLOAD client script, where it will combination of 2 fields values in the form:
like below: http://Current FIELD1 value + /xyz. + Current FIELD 2 value.
Please help me with the script.
Thanks for the help!!!
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
-
Team Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2018 04:31 AM
Hello,
below is onload script.
rename fields names with your field names.
function onLoad() {
//Type appropriate comment here, and begin script below
var f1 = g_form.getValue("u_title");
var f2 = g_form.getValue("u_description");
g_form.setValue("u_url","http://"+f1+"/xyz"+f2);
}
Thanks,
Ali
Thank you,
Ali

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2018 04:31 AM
Hello,
below is onload script.
rename fields names with your field names.
function onLoad() {
//Type appropriate comment here, and begin script below
var f1 = g_form.getValue("u_title");
var f2 = g_form.getValue("u_description");
g_form.setValue("u_url","http://"+f1+"/xyz"+f2);
}
Thanks,
Ali
Thank you,
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2018 06:49 AM
i really doubt if the values would remain same after every time the form loads.
Ill rather suggest to create a UI policy and use the filter field 1 changes or field 2 changes, and rather UNselect the ui policy runs on load.
in execute if true:
var f1 = g_form.getValue("field1");
var f2 = g_form.getValue("field2");
var str= "http://"+f1+"/xyz"+f2;
g_form.clearValue('u_url');
g_form.setValue("u_url",str);