Jump to content

FormBuilder add value into field before send


Chris B
 Share

Recommended Posts

Hi,

I'm using FormBuilder for a front-end form. I have a "postulate_job" parameter corresponding to $page->id where is this form.
This field is intentionally not displayed in the embed. When, I send the form, I will send the value to this field. Is it possible ?

Thx ?

Screenshot at Oct 11 09-04-14.png

Screenshot at Oct 11 09-05-49.png

Screenshot at Oct 11 09-06-33.png

Link to comment
Share on other sites

@Chris B there are a couple of ways.

1. The most secure... use a hook to add the value to the FB after submit (or whatever hook works for you best). See https://processwire.com/store/form-builder/hooks/

2. In your template, use the options array to populate the page id into a hidden field that's rendered but not displayed, eg:

$forms->embed ('my-form', array('postulate_job' => $page->id));

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

5 hours ago, Chris B said:

Hi,

I'm using FormBuilder for a front-end form. I have a "postulate_job" parameter corresponding to $page->id where is this form.
This field is intentionally not displayed in the embed. When, I send the form, I will send the value to this field. Is it possible ?

Thx ?

Moderators Note:  Form Builder has a specialized VIP Support Forum  where you are more likely to get help and support for your issues with Form Builder.  If you don't have access to this area, please send a PM to @ryan (the module's creator and maintainer).  

  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...