We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Safecracker validation

Development and Programming

norris's avatar
norris
1 posts
14 years ago
norris's avatar norris

Hello Guys , i’m using safecracker form for category entry at control panel , my question how to validate that form so that user must select one of the category provided. thanks before

here is a small piece of my script

{exp:safecracker channel="mobil_baru_listing" return="user_main/mobru_list/{logged_in_member_id}” include_jquery=”no” safecracker_head=”yes” } <select name=”category[]” id=”merek_mobil” > <option value=”“>–Pilih Merek Mobil–</option> {exp:channel:categories channel="mobil_bekas_listing" style="linear" category_group="6" parent_only="yes"} <option value=”{category_id}”>{category_name}</option> {/exp:channel:categories} </select>

{exp:safecracker}

       
Bhashkar Yadav's avatar
Bhashkar Yadav
727 posts
13 years ago
Bhashkar Yadav's avatar Bhashkar Yadav

Hi Norris,

Have you tried by having validation rule as Safecraker parameter like

{exp:safecracker channel="mobil_baru_listing" rules:category="required"}

or found any other solution. could you please share you findings.

Best Regards,

       
norris's avatar
norris
1 posts
13 years ago
norris's avatar norris

Hai Bhashkar , thanks for the reply , i have already made a simple validation using jquery , but i will try that attributes in the next coding.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.