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

  • Home
  • SEARCH
  • 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 7769431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:09:29+00:00 2026-06-01T16:09:29+00:00

I am iterating a form in phtml page how can i Submit or validate

  • 0

I am iterating a form in phtml page
how can i Submit or validate the form when i click in the button.
because when i am iterating the form , the id is the same for all form

i am using Zend Framework , i initiate the Form in my view like this to get different ids for each form

<?php
$commentForm = new Application_Form_Comment**($answerId)**;
 echo $commentForm?>

and i sent the $answer[‘answer_id’] to put it in the form id to be like this
<form id="comment_form64623" method="post" action="">

is that the best way ? or there is a way in Jquery to handle that?

  • 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-06-01T16:09:30+00:00Added an answer on June 1, 2026 at 4:09 pm

    I will say, no its not the good way, attaching ID, like that. Configure zend’s form to take the id as a hidden paramter, which at last renders as

    <form id="comment_form" method="post" action="">
        <input type="hidden" name="answer_id" id="answer_id" value="64623" />
    

    Next configure jQuery to change the position of the form to different places and update, like

    $("form").appendTo($("#newDiv")); //Place the for somewhere else
    $("#answer_id").val(newval); //Set a new id for the form
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using document.getElementsByTagName(input) to get all the input elements in my form.While iterating
In Flask 0.8, I know I can access individual form fields using form.fieldname.data ,
I am trying to submit a form with 2 fields with the same name
Is iterating through the vector using an iterator and copying to a list the
If I am iterating over each file using : @echo off FOR %%f IN
My page consists of several areas which are created by iterating over a list
I'm trying to set a font across all TextView 's by iterating through the
Html form is controlled using Knockout JS and jQuery templates. Basic jQuery validation is
I am iterating over an table to pick out the form elements from each
I have the below table in a .JSP page: <form:form method=post action=update.dtt id=contactForms modelAttribute=contactForms

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.