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 9112483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T03:44:46+00:00 2026-06-17T03:44:46+00:00

I have a Zend form and a URL to this form. The URL has

  • 0

I have a Zend form and a URL to this form.

The URL has 3 parameters firstname, lastname and email.
In my form i have 3 input fields that also has firstname, lastname and email.

Whenever I submit the form. It’s getting the values from the URL parameters instead of the form input fields.

Is there a way to get values in the form?

I know that the parameters from url has same name as the form input fields*

URL: http://mywebsite.com/thank-you?key=e72671a8640b45c2401afe887b9b530a&first_name=First&last_name=User&email=user_3fdfsdfs@gmail.com

Zend action controller of the form:

$signupForm = new Application_Form_UserSignUp();
if ($signupForm->isValid($this->getRequest()->getParams()))
        {

            $user = $this->_helper->model('Users')->createRow($signupForm->getValues());   
            if ($user->save())
            {
                Zend_Session::rememberMe(186400 * 14);
                Zend_Auth::getInstance()->getStorage()->write($user);
                $user->sendSignUpEmail();
                $this->getHelper('redirector')->gotoRoute(array(), 'invite');
                return;
            }
        }
$this->view->signupForm = $signupForm;

Zend form:

class Application_Form_UserSignUp extends Zend_Form
{
public $first_name, $last_name, $email, $submitButton;

public function init()
{
    $this->setName('signupForm'); 

    $this->first_name = $this->createElement('text', 'first_name')->setRequired(true);
    $this->last_name = $this->createElement('text', 'last_name')->setRequired(true);

    // Check if email is duplicated in database
    $noEmailExists = new Zend_Validate_Db_NoRecordExists(
            array(
                'table' => 'users',
                'field' => 'email'
            )
        );
    $noEmailExists->setMessage('%value% is already used by another person, please try again with different email address', Zend_Validate_Db_Abstract::ERROR_RECORD_FOUND);

    $this->email = $this->createElement('text', 'email')
                     ->setLabel('Email')
                     ->addValidator($noEmailExists)
                     ->addValidator('EmailAddress')
                     ->setRequired(true);

    $this->submitButton = $this->createElement('button', 'save')
                            ->setLabel('Sign Up')
                            ->setAttrib('type', 'submit');

    $this->addElements(array($this->first_name, $this->last_name, $this->email, $this->submitButton));

    $elementDecorators = array(
        'ViewHelper'
    );
    $this->setElementDecorators($elementDecorators);

}

}
  • 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-17T03:44:47+00:00Added an answer on June 17, 2026 at 3:44 am

    In your controller Action you can pass values to Zend_Form object:

    $form->populate($data);
    

    OR
    $form->setDefaults($data);

    Where populate() takes an array where the keys are the names of the form fields and array values are the field values.

    http://framework.zend.com/manual/1.12/en/zend.form.forms.html#zend.form.forms.elements.values

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

Sidebar

Related Questions

I have a Zend form that has two checkboxes, if the first is unchecked
I have created one user_form class that extends zend form, it has 4 elements
I have a Form element: $Form=new Zend_Form; $Form->setAction($this->view->url(array('controller'=>'auth','action'=>'create'),null,true)) ->setMethod('post') ->setAttrib('id','auth-form') ->removeAttrib('enctype'); As can be
I have a zend form that I'm initializing as follows: $form = new Form_XYZ();
I'm validating a Zend form with Ajax and have come up with this: $('#some-dialog-i-have
I have a simple Zend Form that contains a textbox with setRequired(TRUE) and other
I have a zend form that lets the user fill out attributes of an
Hello i have a Zend Form with 2(two) Zend_Validate_Db_RecordExists toghether like this : $ditta_esiste
In Kohana/CodeIgniter, I can have a URL in this form: http://www.name.tld/controller_name/method_name/parameter_1/parameter_2/parameter_3 ... And then
We have a form that submits data to various Google Spreadsheets using Zend Gdata.

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.