Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
chirag @ India
web form validation is not working ???
26. März 2013 00:44
Antwort

chirag @ India

Rang: Regular Member

Nachrichten: 129

Eintrittsdatum: 20. Dezember 2011

Neue Beiträge

I try to implement client side validation using java script ,but it is not validate form input data in web form portlet in liferay

what i do is :

First In Portlet-ext.porperties i write this line to enable java script and then restart server

validation.script.enabled true

After Web-form configuration i right simple script

== Mobile No ==

var alphaExp = /^[a-zA-Z]$/;
if(currentFieldValue.match(alphaExp)) {
return false;
}else {
return true;
}
== Email Id ==
if (currentFieldValue.indexOf("@")>=0)
return true;
else return false;

then publish,but this is can't validate from data and form successfully sended!!

help me out...
Muradali Hasan
RE: web form validation is not working ???
19. Mai 2013 22:44
Antwort

Muradali Hasan

Rang: Junior Member

Nachrichten: 83

Eintrittsdatum: 26. Juli 2010

Neue Beiträge

Hi Chirag,

May be you are using form submit object which submit your form.

you can do one think change submit type to button and call java script function on onclick() after validating your data submit form through java script.

document.<formname>.submit();
Timo Kurowski
RE: web form validation is not working ???
27. Juni 2013 06:12
Antwort

Timo Kurowski

Rang: Regular Member

Nachrichten: 225

Eintrittsdatum: 24. Juni 2013

Neue Beiträge

I have the exact same Problem. Cant change the Button tho, since its a downloaded portlet that sits on the server where i cant reach its code. (Translation is horrible, too).
Edwin Buising
RE: web form validation is not working ???
23. Juli 2013 05:42
Antwort

Edwin Buising

Rang: New Member

Nachrichten: 2

Eintrittsdatum: 5. Februar 2013

Neue Beiträge

I have the same issue. Any developments?
Neetu Mishra
RE: web form validation is not working ???
23. August 2013 07:25
Antwort

Neetu Mishra

Rang: Junior Member

Nachrichten: 69

Eintrittsdatum: 21. Mai 2012

Neue Beiträge

Hi All,

Please refer the below link:
http://www.liferay.com/community/forums/-/message_boards/message/15848474


Regards,
Neetu