13 Jan 2014

Magento: Submit custom form with magento’s built-in ajax with validation

/* Magento: Submit custom form with magento’s built-in ajax with validation */
Suppose I have created a custom form and I want submit that form through through ajax funtionality with magento’s own validation style.As you know for validating(not leaving blank) a field in magento we simply use a class called class="required-entry".So I have used required-entry class to validating my form. Below is my custom form which I have placed inside view.phtml file for giving product information through email to customer. If customer will click the link “get product details” then this form will be appeared and then he can fill up the form and submit for getting details.



Note : Don’t put this custom form iside any other magento’s form.

My Custom Form:



        
Email request for lowest price of getName()?>

* Required Fields



My Javascript :



Related Links :

1)Magento : List Of Prototype Javascript Validation Classes With Error Message

No comments:

Post a Comment