Checkboxes and radiobuttons validation

118 views
Skip to first unread message

cotria

unread,
Sep 23, 2011, 9:49:05 AM9/23/11
to jQuery dForm
Hello,

First of all thank you for creating this extremely useful plugin.

I have tried to add validation for checkboxes and radiobuttons in my
json but my page never displays. Validation works for textboxes
though. Is this a not implemented feature and if yes do you have any
ideas on how to fix this as i m rather new in jquery in general.

Kind Regards,


cotria

Daff

unread,
Sep 23, 2011, 10:55:10 AM9/23/11
to jQuery dForm
What is the JSON / form definition you are using?
Maybe it doesn't apply the validation rules because of the way
checkboxes are generated.

cotria

unread,
Sep 26, 2011, 3:46:48 AM9/26/11
to jQuery dForm
Hi again,

i m pasting the json below as it is assigned to a javascript variable:

var formdata =
{
"action": "something.html",
"method": "post",
"elements": [
{
"name": "customer_address_en",
"caption": "Address",
"type": "text",
"value": "Vrysi Mykonos",
"validate": {
"required": false
}
},
{
"name": "customer_zipcode_el",
"caption": "T.K.",
"type": "text",
"value": "84600",
"validate": {
"required": false
}
},
{
"name": "customer_mobile_el",
"caption": "Mobile Phone",
"type": "text",
"value": "",
"validate": {
"required": false
}
},
{
"name": "eih_unit_type_el",
"type": "radiobuttons",
"options": {
"26": {
"caption": "Hotel",
"checked": "checked"
},
"27": "Hotel Boutique ",
"28": "Resort",
"29": "Motel",
"220": "Camping"
},
"validate": {
"required": true
}
},
{
"name": "eih_high_season_el",
"type": "checkboxes",
"options": {
"117": "January",
"118": "February",
"119": "March",
"120": "April",
"121": "May",
"122": {
"caption": "June",
"checked": "checked"
},
"123": {
"caption": "July",
"checked": "checked"
},
"124": "August",
"125": "September",
"126": "October",
"127": "November",
"128": "December"
}
},

]
};

The form never loads fully. Radio buttons are broken and checkboxes
dont appear. If i remove the validate pair everything works but
without validation.

LendingKart Dev

unread,
Nov 17, 2015, 1:47:21 AM11/17/15
to jQuery dForm, cot...@gmail.com
hey, 

Did you get the solution ??
Please share if you do.
Reply all
Reply to author
Forward
0 new messages