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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:18:42+00:00 2026-05-27T21:18:42+00:00

I have my form in my action: $this->form = new SomeForm($this->data); the form has

  • 0

I have my form in my action:

$this->form = new SomeForm($this->data);

the form has a bunch of fields I don’t need for one action but has stuff I need for another action. What is the best way to handle this? Create an individual form for each necessity or dynamically remove fields when I instantiate it as above?

Thanks

  • 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-27T21:18:43+00:00Added an answer on May 27, 2026 at 9:18 pm

    It sounds like you are doing a multi-part form.

    I assume that you want to validate all the values submitted in your form, but just not save them.

    1. Its sounds like you are doing an abstract form, so don’t extend a base object form, rather extend BaseForm.
    2. Don’t unset the values, use the form to validate them, even if they’re going to be used later.
    3. They are saved to the form object, so you can use that to pass values to your next action, so this is helpful, plus they are validated.
    4. Override doSave() in the form to save the objects of the form you want to save.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this HTML: <form action='uploadhandle.php' method='POST' enctype=multipart/form-data> <input type='file' class='fileinput' id='photo1' name='photo1'> <input
I have some form, and one column have Entity type, but this entity have
I have a form whose action is set to itself. I want it this
I have simple form like this which accepts only two values string action and
I have form like this: <form method=POST action=<?php echo base_url() ?>admin/admin_search> <fieldset> <label for=nalozi>Nalozi</label><input
I have this form:- <form action=> <table border=0> <td colspan=2 class=instruction>Select your desired option
i have this html <ul> <li><form action=# name=formName></li> <li><input type=text name=someName /></li> <li><input type=text
I have situation like this: user submits form with action='/pay' in '/pay' I have
I have a simple form like this: <form name=serachForm method=post action=/home/search> <input type=text name=searchText
no title that fits this bug but this how it goes, i have form

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.