Jump to content
Chris B

FormBuilder add value into field before send

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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...