PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

save data with another form_id

  1. elinet
    Member

    Hello,
    in on one of my site i have a form that allows users to join the association to which the site refers.

    I duplicate this form for associate particular users, this duplicated form will only be used by me and help me to not manually enter users on db.

    The question is.. when I will insert users with "my form" I want this data have the same "form_id" of the main form..

    Is there any hook to use?

    Thanks!

    Marco Bullo

    Posted 11 years ago on Monday December 10, 2012 | Permalink
  2. David Peralty

    There isn't any easy way to do this. Why don't you fill out the main form yourself? I guess I don't understand well enough why you duplicated the form.

    Posted 11 years ago on Monday December 10, 2012 | Permalink
  3. elinet
    Member

    I can't fill the main form because after filling, it send a notification to the the federated association.
    These inserts made ​​by me, should not be as entries in the on-line form..

    I think the solution is to change with a query on the database, the "id_form" .

    Posted 11 years ago on Wednesday December 12, 2012 | Permalink
  4. David Peralty

    I don't think you can just change the id_form, as it could create other issues. I am going to ping our developers to see if they can give you a better idea of what might need to be done or if that's enough to do what you want.

    Posted 11 years ago on Wednesday December 12, 2012 | Permalink
  5. elinet
    Member

    Thank's David await for news

    Posted 11 years ago on Thursday December 13, 2012 | Permalink
  6. Is the only issue with using one form that the notification will be sent out, when filling it in yourself? Is it OK that all entries be stored together? How about if we figure out a way to turn off admin notifications when you are submitting the form yourself?

    Posted 11 years ago on Thursday December 13, 2012 | Permalink
  7. elinet
    Member

    unfortunately I can not disable notifications administration because we are in membership campaign ..
    Thanks anyway

    Posted 11 years ago on Friday December 14, 2012 | Permalink
  8. David Peralty

    Here is what you could do:

    1. Create a hidden field on the form, check the dynamically populate option, and give a parameter name, for example "who".

    2. When you are filling out the form, you include the parameter name of the form in the querystring with a particular value. For example who=admin (http://sitename.com/form/?who=admin)

    3. You add a gform_pre_submission_filter hook to your functions.php - example here: http://pastie.org/5563100 .

    You can use whatever value you want, my example had the value as "admin" . The example removes the notifications from the Form object so there aren't any to process.

    Posted 11 years ago on Monday December 24, 2012 | Permalink