Alert for required fields

323 views
Skip to first unread message

swati.sa...@gmail.com

unread,
Dec 3, 2014, 2:55:05 AM12/3/14
to suppor...@runmyprocess.com
Hi ,

In my web interface there are about 8 to 9 fields where value required is checked, now the situation is when the user try to submit the form and if at that point any required field value is not entered the form won't get submitted which working Fine.

The only thing i want now, when ever the user try to submit a form without filling the required fields there should be an alert or error massage telling the user that the he needs to fill the required fields.

Now i know that i can go into individual required fields and put a script in each of this required widget with a condition

if(value==undefined)
{
\\ show alert

}

But if i do that in that scenario if two or three required fields are not fill up by the user and he tries to submit the form then at that point of time there will be three alerts will be coming form this three widget, .

Where as i want one single alert to be hold for all the required fields , so that until and unless this fields are fill up by the user and if accidentally the user try to submit the form he will get only single alert.


so could tell me how to do so??? I tried using RMPApplication.getAllVariablesValues(); but it was not coming the way i want.

so please help...

Thanks and Regards
Swati Sarkar

Sweta Suman

unread,
Dec 3, 2014, 3:11:41 AM12/3/14
to suppor...@runmyprocess.com
Hi Swati,


Hope this helps you.

Thanks and Regards,
Sweta

Swati Sarkar

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/58667c24-4a41-40cb-9d78-b2f8e4278cdc%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.

Sweta Suman

unread,
Dec 3, 2014, 3:25:18 AM12/3/14
to suppor...@runmyprocess.com
Hi Swati,

Adding to my previous post . You can also do it by writing following JS on button click.

e.g I have three widget on web form as name,address and country with value variable as name,address and country.

var name = RMPApplication.getVariable("name");
var address = RMPApplication.getVariable("address");
var country = RMPApplication.getVariable("country");

if((name == "")||(address== "")||(country==""))
{
alert("Please fill mandatory fields!");
}

else
{
alert("Thank you");
}

Thanks and Regards,
Sweta

Swati Sarkar

unread,
Dec 3, 2014, 5:21:01 AM12/3/14
to suppor...@runmyprocess.com, Sweta Suman
Hi Sweta,

There will be slight change in the code i.e 
if((name ==undefined)||(address== undefined)||(country==undefined))
{
alert("Please fill mandatory fields!");
}

else
{
alert("Thank you");
}

If undefined is not given then only the else part executes

The issue has been solved thanks for the help.

Thanks and Regards
Swati Sarkar.

You received this message because you are subscribed to a topic in the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/a/runmyprocess.com/d/topic/supportforum/tAxbPUHu6ls/unsubscribe.
To unsubscribe from this group and all its topics, send an email to supportforum...@runmyprocess.com.

To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
Reply all
Reply to author
Forward
0 new messages