Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6665951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:46:39+00:00 2026-05-26T02:46:39+00:00

I have a form in Magento that I build in code, and that works

  • 0

I have a form in Magento that I build in code, and that works with ajax, which I need to validate.

I would like to be able to use Magento’s built-in validation functionality, but I don’t know how I would trigger it since the form is not submitted. The data is retrieved via ajax and outputted in a list below the form.

Is there someone who can point me in the right direction?

Thanks in advance.

Edit:

This is the javascript code used to hande the ajax request. Its called by the onclick event of the button.

function advancedtranslateSearch(url){  
    new Ajax.Request(url, {
      method: 'get',
      parameters: $('search_form').serialize(),
      onSuccess: function(transport) {
          json = transport.responseText.evalJSON();
          $('result').update('<div class="hor-scroll">'+json.records+'</div>');
      }
    });
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T02:46:39+00:00Added an answer on May 26, 2026 at 2:46 am

    You should use form’s onsubmit event.
    To prevent page from reloading you must return false value from your function.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have form with dateTimeField, and ListView. ListView looks like that: final ListView<String> countryView
I have form which is built like this: <%= form_for @location do |f| %>
I have a form in Magento that is displayed over the insecure URL (http)
I need to create module in Magento which will have few database tables. One
I would like to send an email from a magento/php form. Can somebody please
I have Form Designer web application, in which I need to post the controls
Is it possible to use pages in Magento to have a customizable contact form?
I have form that displays several keywords (standard set of choice lists that changes
I have form, where some fields are looks like rows, so I can add/delete
I currently have form that checks if a user has unsubmitted changes when they

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.