Email/ID (Single Line Text Box) Confirmation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 10:49 AM
Good Morning Team,
Something I am working on requires me to add a text box for the ID Number (single line text) and then asks for another text box to confirm the ID Number is correct. Is there any UI policy or such that will have the system check if the two variable inputs are the same? How should I go about doing this?
Thank you,
VD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 11:13 AM
Hello @vishwadhatha ,
Please follow below steps.
1. Create two variables, for example TEST 1 and TEST 2.
2. Create a UI policy, which will show the TEST2 variable only when TEST is not empty.
3. Create a onChange client script on TEST2 variable which will get the values both variables and check if they are similar or not.
4. If similar you can proceed further else clear the value of TEST2 variable.
Using this way you can verify that both the values are same.
Kindly mark the answer Correct or Helpful if it addresses your concern.
Regards,
Siddhesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 11:26 AM
Hey Siddhesh,
Could you give me an example or template of what the client script should look like?
Thank you,
VD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 10:58 PM
Hello @vishwadhatha ,
this is the simplest template you can use for you client script:
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var var1 = g_form.getValue('test_1');
var var2 = g_form.getValue('test_2');
// Check if the values are the same
if (var1 === var2) {
alert('The values are the same');
} else {
alert('The values are not the same');
g_form.clearValue('test_2');
}
}
Kindly mark the answer ✔️Correct or Helpful ✔️If it addresses your concern.
Regards,
Siddhesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 11:27 AM
Hey Siddhesh,
Thank you for the guidance, could you give me an example or template of what the client script should look like for this?
Thank you,
VD