Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
gary b
Custom field validations
February 15, 2013 10:33 PM
Answer

gary b

Rank: Junior Member

Posts: 63

Join Date: February 2, 2013

Recent Posts

I have added 4 custom field in liferay 6.1 for users( using control panel>>custom fields>>users>>add custom field)

One of them is check box and 3 are drop down. I want when user go custom field(control panel>>my account>>custom field) he should not be able to save the data if he has not checked any checkbook and not selected the value from drop down.

Can any one help me how to apply validations on custom fileds?
Gnaniyar Zubair
RE: Custom field validations
February 15, 2013 10:42 PM
Answer

Gnaniyar Zubair

Rank: Liferay Master

Posts: 603

Join Date: December 19, 2007

Recent Posts

Hi,

You can validate the custom field by overriding CreateAccountAction through HOOK or EXT.

Hope this below link would resolve your issue:

Custom Field Validation
gary b
RE: Custom field validations
February 16, 2013 5:42 AM
Answer

gary b

Rank: Junior Member

Posts: 63

Join Date: February 2, 2013

Recent Posts

I know i can do this using hook. I want to know how to implement that for checkbox and drop down.
Do you know?
Gnaniyar Zubair
RE: Custom field validations
February 16, 2013 5:56 AM
Answer

Gnaniyar Zubair

Rank: Liferay Master

Posts: 603

Join Date: December 19, 2007

Recent Posts

what is your issue for getting checkbox and select box values in your custom CreateAccountAction file as mentioned in that blog ?

if you want to get the client side validation, just use this jQuery


$("input[id*='chkBoxName']")..click(function() {

//alert("clicked checkbox")
// do your validation

})