フォーラム

ホーム » Liferay Portal » English » x. Miscellaneous

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
chirag @ India
web form validation is not working ???
2013/03/26 0:44
答え

chirag @ India

ランク: Regular Member

投稿: 129

参加年月日: 2011/12/20

最近の投稿

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 ???
2013/05/19 22:44
答え

Muradali Hasan

ランク: Junior Member

投稿: 83

参加年月日: 2010/07/26

最近の投稿

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 ???
2013/06/27 6:12
答え

Timo Kurowski

ランク: Regular Member

投稿: 240

参加年月日: 2013/06/24

最近の投稿

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 ???
2013/07/23 5:42
答え

Edwin Buising

ランク: New Member

投稿: 2

参加年月日: 2013/02/05

最近の投稿

I have the same issue. Any developments?
Neetu Mishra
RE: web form validation is not working ???
2013/08/23 7:25
答え

Neetu Mishra

ランク: Junior Member

投稿: 76

参加年月日: 2012/05/21

最近の投稿

Hi All,

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


Regards,
Neetu