With the help of the JetFormBuilder plugin, it is possible to create a front-end registration form with email confirmation. To register on the site, the user should input the login and email address and follow the verification link sent to the mailbox. Once the user follows the link, the registration process is completed.

Email verification helps validate the user request before the form is submitted. Also, it makes the registration process fast and effortless — creating a password to complete the registration is not required. The user can use an automatically generated password to log in to the site in the future.

submitting the registration form with email verification

Create a New Form

In the WordPress Dashboard, navigate to the WordPress Dashboard > JetFormBuilder > Add New tab to start creating a new form. 

In the form editing page, enter the form name. 

The form will contain two Text Fields and one Checkbox Field. The first Text Field will allow the user to enter the email address, and the second Text Field will allow entering the login. The Checkbox Field will serve as a “Remember Me” field. 

In the Welcome block, pick the “Register User” pattern.

register user form pattern

It adds two Text Fields: “Email” and “Login.”

In the right sidebar with Block settings, you can change the FIELD LABEL and FORM FIELD NAME of the Text Fields according to your preferences.

NOTE

Mind that the FORM FIELD NAME should contain only lowercase Latin letters with no spaces; numbers, dashes (“-”), and underscores (“_”) are allowed.

Also, note that the FIELD TYPE of the “Email” field should stay as “Email.”

email text field

Then, add a Checkbox Field below. Leave the FIELD LABEL empty and define the FORM FIELD NAME — for example, type “remember-me.”

Press the “Manage items” button to configure the options for this Checkbox Field.

creating remember me checkbox in jetformbuilder registration form

In the opened pop-up, click the “Add new Option” button. Complete a LABEL field — “Remember Me.” Insert “1” as the VALUE option.

configuring the remember me checkbox field

Once done, “Update” the changes.

Set Up Post Submit Actions

Switch the Block settings tab in the right sidebar to the JetForm tab. Unfold the Post Submit Actions section.

The “Register User” pattern added three post-submit actions: “Verification,” “Register User,” and “Save Form Record.”

post-submit actions added with the register user pattern

Configure the “Verification” action

Click the “pencil” icon under the “Verification” action to open the customization pop-up.

verification action editing

The “Verification” action sends an email with a verification link to the specified email address. The user should press this link within the defined timeframe to complete the verification. Once the verification is complete, the rest of the Post Submit Actions will be executed.

The WHO CAN VERIFY THE SUBMISSION setting defines who has the authority or capability to verify or approve a submitted form:

After setting the verification permission, enter the number of hours into the LINK LIFESPAN field. This setting defines the timeframe within which the verification link remains active. If the LINK LIFESPAN field is left empty or if “0” is entered, the verification link will not have an expiration time.

After that, choose the email field from the suggestions under the EMAIL FIELD drop-down menu. Once the email field is specified, a new toggle will appear, encouraging you to Create custom verification email.

edit verification action

If the toggle remains disabled, a standard email will be sent to the user from the Administration Email Address set in the WordPress Dashboard > Settings > General tab.

standard email verification letter of jetformbuilder

Enable the Create custom verification email toggle and proceed to the rest of the action settings. We will set up the “Send Email” action later.

Move on to the SUCCESS PAGE and the FAILED PAGE settings. Select a page where the user should be redirected in case of a successful or failed verification. If no page is selected, the user will be redirected to the page where the form was initially submitted. It is also possible to “configure a separate Redirect to Page action” for each case.

create custom verification email

In our example, we will redirect the user to a “My Account” page after successful verification and to a static “Verification Failed” page if the user fails to complete the verification. 

Once you finish the setup of this action, click the “Update” button to save the changes.

Set up the “Register User” action with an auto-generated password

Press the “pencil” icon to edit the “Register User” action’s settings.

edit register user action

In the FIELDS MAP section, the “Email” and “Login” fields are already mapped. Therefore, the value entered by the user into the “Login” field will be saved as the user login, and the value of the “Email” field will be saved as the user’s email. 

the Password and the Confirm Password fields with the “Secure unique token” option. The “Secure unique token” option is added by the “Verification” action and represents a unique password auto-generated after form submission. This way, the form lets the user sign up with only their email and login, not requiring them to create a password manually at this stage. Later, this password will be sent to the user with a “Send Email” action.

register user action fields map

Scroll past the FIELDS MAP section and select the User Role, which should be assigned to the newly registered user (e.g., “Subscriber”).

user role setting

Next, scroll down to find and activate the Log In User after Register: toggle. This way, the user will be automatically logged in after completing the verification process. 

Select the “remember-me” Checkbox Field as the “REMEMBER ME” FIELD option. This field helps to keep the user authenticated for a longer period of time — after checking the “Remember Me” checkbox, the user will remain logged in for fourteen days; if not, only for two days.

We have finished setting up the “Register User” action. Save the settings and proceed to the next step.

log in user after register toggle

“Save Form Record” action

The “Save Form Record” action stores the submitted form data on the Form Records Page. On this page, you can verify emails manually as described in the Verify Emails Manually from the WordPress Dashboard chapter of this tutorial.

In our case, we don’t need to modify the action settings, but you can configure them according to your needs.

save form record action

Add a “Send Email” action for a custom verification email

Now, it is time to create a custom verification email.

Open the settings of the “Verification” action once more to click the “+ Add Send Email action” button. It will automatically add a new Send Email” action where each part of the verification email can be customized.

add send email action

Leave the MAIL TO and FROM FIELD settings intact and proceed to configure the rest of the fields.

edit send email action

After setting up the REPLY TO, SUBJECT, FROM NAME, and FROM EMAIL ADDRESS fields, select the “HTML” CONTENT TYPE to allow the processing of HTML tags in the content of the email.

Then, edit the content of the email according to your needs. It is also possible to insert Macros to retrieve the values entered by the user into the form fields. To see the list of available Macros, click the wrench-shaped icon near the CONTENT field label.

email content

The list contains general Macros that represent each form field and three special Macros added by the “Verification” action:

  • %_jfb_verification_token% — represents a unique token generated for the user. If this token was set as the user password in the “Register User” action settings, you can insert the %_jfb_verification_token% macro in the email content to send the user this automatically generated password. The user will use it to log in; 
  • %_jfb_verification_token_id% — represents the ID of the verification token in the database. A reference to each verification token is saved in the “jet_fb_tokens” database table; however, the token itself is not stored there;
  • %_jfb_verification_url% — a verification link the user receives to complete the verification process. The link contains the verification token and its ID.

We used only the %_jfb_verification_url% macro from the above list and composed such an email:

“Please confirm your registration on the site %CT::SiteName%.

<b>If this was a mistake, ignore this email, and nothing will happen.</b>

To complete the registration, click on the link:

%_jfb_verification_url%

The link expires in 4 hours!”

Click the “Update” button to close the customization window and proceed to the following “Send Email” action.

Add a “Send Email” action to send the password details

The next step is to compose an email, which will be sent to users after they complete the registration. The letter will include an automatically generated password that users can utilize to log into the site until they opt to modify it.

Press the blue “+ New Action” button to add a new “Send Email” action, and click the pencil-shaped icon under the action name to call the customization pop-up.

add new send email action

Select the “Email from submitted form field” option for the MAIL TO field. Then, pick the “Email” field in the FROM FIELD drop-down menu, which appears below.

email from submitted form field

After setting up the REPLY TO, SUBJECT, FROM NAME, and FROM EMAIL ADDRESS fields, select the “Plain Text” CONTENT TYPE option. To allow the processing of HTML tags in the content of the email, select the “HTML” CONTENT TYPE.

Finally, compose the content of the letter, which the users receive after they complete the registration. Include the %_jfb_verification_token% macro to send the users their auto-generated passwords.

We composed such a letter:

“Your registration on [%CT::SiteName%] is completed. Follow this link to enter your account:

https://test-site/account/

This is your temporary password: %_jfb_verification_token%

You can change the password in Profile Settings: 

https://test-site/account/settings/”

including auto-generated password in the email content in jetformbuilder

Once you are finished with the settings, “Update” the changes.

General Messages Settings

Scroll past the Post Submit Actions settings tab and unfold the General Messages Settings. Settings in this tab allow changing the default notifications that pop up after the form submission.

Most importantly, change the default FORM SUCCESSFULLY SUBMITTED message and encourage users to check their mailbox after they submit the form. For example: “Please, check your email inbox to complete the registration.”

general messages settings

Once you finish customizing the form messages, the form is complete. Hit the “Publish/Update” button to save the result. 

Display the Form on the Front End

Head to the page or template where the registration form should be located.

If editing the page with Block Editor, use the JetForm block to display the form in the needed part of the page.

display the registration form with the jetform block in block editor

If editing with Elementor, use the JetForm widget to place the form on the page.

display the registration form with the jetform widget in elementor

For more details, follow the detailed How to Display a Form on the Front End guide to learn how to add the form in any page builder.

Test the Flow

Move to the front end and complete the form to register a new user. Use an email address you can access.

submitting the registration form with email verification

Check the email inbox for a new letter containing the verification link. Follow the link to complete the registration.

click the link in the inbox to complete the registration

After following the link, one should be redirected to the page previously selected in the settings of the “Verification” action. The registration is complete, and a new user is created in WordPress.

Also, the second email is sent to the user containing the password to the account.

auto-generated password is sent to the registered user in email

Verify Emails Manually from the WordPress Dashboard

With the “Save Form Record” post-submit action, you can reach the submitted form data in the WordPress Dashboard > JetFormBuilder > Form Records tab.

If the form has the “Verification” action, the submitted form can have three Statuses

  • Verified – if the user verified the form from the email or the administrator verified it manually. You can set who can verify the form (only admin or user and admin) in the “Verification” action WHO CAN VERIFY THE SUBMISSION setting;
  • Waiting verification – if the user or admin hasn’t verified the form yet;
  • Verification token expired – if the user or admin didn’t manage to verify the form in the timeframe set in the LINK LIFESPAN settings of the “Verification” action. Then, the user needs to submit the form one more time to verify it.
form verification statuses

If the submitted form has the “Waiting verification” Status, it contains the “Verify manually” action by clicking which the form obtains the “Verified” Status.

verify form manually

If you hit the “View” action under the form with the “Verification” post-submit action, you’ll see the Verification section. 

This section shows the verification Status: “Pending,” “Expired,” or “Verified.” It also displays the time when the verification Expires, Expired, or was Verified according to the Status.

If the verification has a “Pending” Status, the section contains the “Verify” button with which the administrator can verify the form.

verification section in the form details

Also, pay attention to the Actions Log sections: if the form is expired or waiting for verification, only two actions are completed: “Verification” and “Send Email” with the custom verification email.

If the user or administrator verifies the form, the next two actions are completed: “Register User” and “Send Email” with the password details.

verified form actions log

That’s it; you have learned how to create a registration form with a double opt-in using only the free version of the JetFormBuilder plugin.

The “Verification” action allows verifying the user’s email before processing other Post Submit Actions. The form will send an email with a confirmation link to the address entered by the user. After the user follows the confirmation link, the verification is completed, and the form is submitted successfully.

email verification action settings in jetformbuilder

Table of contents:

Verification Action Settings

The “Verification” action can be found by opening the Post Submit Actions tab of the form. To add a “Verification” action, the “+ Verification button should be pressed. 

Each form can have only one “Verification” action.

add new verification action in jetformbuilder

To edit the action, one should click the pencil-shaped button.

edit verification action

Pressing the button activates the customization pop-up.

the first part of verification action settings
  • LINK LIFESPAN — after submitting the form, the user receives an email containing a verification link. The LINK LIFESPAN setting indicates the expiration time of this verification link. Here, one can specify the number of hours during which the link stays active. If this field is left empty or contains the “0” value, the link will have no expiration time;
  • EMAIL FIELD — a drop-down list to select a form field in which the user should enter the email address. A verification email will be sent to the address entered into the selected field. If one of the Text Fields in the form has the “Email” Field Type chosen, this Text Field will appear in suggestions.
create a custom verification email
  • Create custom verification email — the toggle appears after selecting an EMAIL FIELD option. If the switcher is disabled, a standard verification email will be sent. If enabled, an Add Send Email action” button will appear, encouraging one to create a custom “Send Email action with complete control over the email settings.
select the custom page to redirect the user after email verification
  • SUCCESS PAGE — here, one of the existing pages can be selected to redirect the user after a successful verification. If no page is set, the user will be redirected to the page where the form was submitted. It is possible to configure a separate “Redirect to Page action for the same purpose by clicking on the “configure a separate Redirect to Page action link;
  • FAILED PAGE — here, one of the existing pages can be selected to redirect the user in case of a verification failure. If no page is selected, the user will be redirected to the page where the form was submitted. By clicking the “configure a separate Redirect to Page action link, a fully customizable “Redirect to Page” action can be created.

Events

Events define the time and condition under which a specific Post Submit Action should be performed. Usually, events are used with the Payment Gateways to control when the action should be executed — after or before the payment is completed.

The “Verification” action adds two new Events — “VERIFICATION.SUCCESS” and “VERIFICATION.FAILED.” These events can be added to Post Submit Actions to define which action to perform in case of a successful or unsuccessful verification. 

In a form where the “Verification” action is present, and the Payment Gateways are disabled, three events can be used:

  • DEFAULT.PROCESS — actions with the “DEFAULT.PROCESS” Event will be executed right after the form submission and before the user completes the email verification. For example, if a custom verification email is created through the “Send Email” action, the “Send Email” action is automatically assigned the “DEFAULT.PROCESS” Event
  • VERIFICATION.SUCCESS — this event fires after the email verification is completed successfully. Therefore, actions with the “VERIFICATION.SUCCESS” Event will be performed once the user clicks the confirmation link in the mailbox and the verification is successful;
  • VERIFICATION.FAILED — this event is triggered when the user fails to complete the email verification. Actions with the “VERIFICATION.FAILED” Event will run if the user follows a verification link that was already used or if the link contains an incorrect token.
NOTE

If an action is not associated with any specific Event, it will be executed after the verification is completed successfully, identically to the behavior of the “VERIFICATION.SUCCESS” Event.

To assign a new Event to a Post Submit Action, one should click the “Edit Conditions & Events button under the name of the specific action.

adding new events to post submit actions

Then, one should switch to the Events match tab in the Edit Action Conditions & Events pop-up to add a new Event.

add new post submit action event

Additional Settings for Register User Action

The “Verification” action adds new field options to the settings of the “Register User” action:

fields added to post submit actions by the verification action
  • Secure unique token — this option is usually selected for the Password and Confirm Password fields. The “Secure unique token” allows automatically generating a password for the user until the user creates a new password manually. This token can be sent to the user in the “Send Email” action using the %_jfb_verification_token% macro;
  • ID of the secure unique token — a reference to each token is saved in the “jet_fb_tokens” database table, and the “ID of the secure unique token” option represents the ID of that record in the database. The token itself is not stored in the database;
  • Verification URL — a verification link the user clicks to complete the verification process. The link contains the token and its ID.

Follow a related step-by-step guide to learn How to Create Registration Form With Email Verification from scratch.

That’s all about the “Verification” Post Submit Action available as part of the JetFormBuilder functionality for your WordPress-built forms.

Tutorial requirements:

  • Elementor (Free version) or WordPress Block editor (Gutenberg);
  • JetFormBuilder plugin installed and activated;
  • JetEngine plugin installed and activated.

The JetEngine Data Store module allows users to save featured items. The Data Store Actions add-on adds a Post Submit Action to the JetFormBuilder forms to remove saved items with one click.

Install and Activate the Data Store Actions Add-on

The first step is the installation and activation of the add-on. 

For this, navigate to the Crocoblock Free DevTools Kit page, find the Data Store Actions add-on, and click the “Download” button.

Crocoblock Free DevTools Kit

Move to the WordPress Dashboard > Plugins > Add New tab, install and activate the add-on.

upload plugin

Create a Data Store

Create a full-set data store on the website.

For example, I created a data store for the favorite jobs in the JetEngine > JetEngine > Data Stores tab with the help of the Data Stores Overview and How to Create Favorites Page Using Data Stores Module.

Besides that, you can learn How to Create “Recently Viewed” Section Using Data Stores Module, and How to Add Terms to Data Store.

data store example

I proceeded to the page with the Listing Grid with jobs and saved several job positions.

job listing grid

Also, I went to the page with the Listing Grid with the query that shows items added to the data store. Open the page in the Elementor or WordPress (Block) editors, and click to edit the Listing Grid widget or block. 

Open the Advanced settings tab and enter the CSS ID. Later, you can enter the Listing Grid CSS ID into the form to clear the data store if the “AJAX” Submit Type for the form is set.

The Elementor view:

CSS ID for widget in the Elementor editor

The Gutenberg view:

CSS ID for block in the WordPress block editor

Create a Form

Go to the JetFormBuilder > Add New tab. Enter a title, delete the Text Field, and change the Action Button label according to your needs. 

submit button label

Navigate to the JetForm tab and unfold the Post Submit Actions tab. Pick the “Clear Data Store” option and hit the pencil icon.

clear data store post submit action

In the Edit Action pop-up, enter the Data store slug (you can find it in the JetEngine > JetEngine > Data Stores tab) and the Listing Grid CSS ID into the Listing to update field. If you want to clear data stores of several Listing Grids, separate the CSS IDs with commas. The Listing to update option helps to update Listing Grids if you select the “AJAX” form Submit Type when you set the form placed on the page.

Then, push the “Update” button.

data store slug and listing to update

Press the “Publish/Update” button to save the form.

Place the Form

Open the page where the data store items are in Elementor or Gutenberg editor and place the JetForm widget or Form block.

Choose Form from the drop-down menu and set other settings. You can learn more from the Adding the Form Block tutorial.

jetform widget

Settings in the WordPress editor are the same:

form block

Also, you can hide the form after removing the data store items using the JetEngine Dynamic Visibility Feature.

NOTE

The Dynamic Visibility feature works only with the “Page Reload” Submit Type.

In the Elementor editor, go to the Advanced settings tab and open the Dynamic Visibility tab. Enable the toggle, pick the “Show element if condition met” Visibility condition type, and “Query Has Items” Condition. From the Query to check drop-down, select the needed custom query that shows data store items in the Listing Grid on the page.

visibility condition for the form

In the WordPress (block) editor, click the eye icon.

dynamic visibility icon in the Gutenberg editor

Enable the toggle, pick the “Show element if condition met” Visibility condition type, click the “Add new item” link, and select the “Query Has Items” Condition. From the Query to check drop-down, select the needed custom query.

dynamic visibility in the Gutenberg editor

Finally, click the “Update” button to save the form.

Check the Results

Open the page on the front end.

clear data store action on the front end

Hit the “Submit” button to check how the action works.

After that, all data store items are successfully removed from the page, and the form is hidden according to the visibility condition.

data store items are removed with the action

That’s all. Now you know how to clear the data store with the JetFormBuilder plugin.

In this tutorial, we’ll figure out how to redirect our form to Thank you page with the help of the JetFormBuilder plugin and WooCommerce Cart & Checkout Action addon.

Install and Activate Add to Cart & Redirect to Checkout Addon

So the first step will be the installation and activation of the addon. 

For this, navigate to WordPress Dashboard > JetFormBuilder > Addons and find the “WooCommerce Cart & Checkout Action” addon in the All Available Addons section. Click on the “Install Addon” and don’t forget to press the “Activate Addon” button.

Also, please, make sure that you already have the WooCommerce plugin installed and activated.

install woocommerce cart and checkout action addon

Create an Order Submission Form

When we are done with the first step, let’s create a new form by moving to JetFormBuilder > Forms and pressing the “Add New” button.

create form in the jetformbuilder directory

Add as many fields as you need because later, we will display the submitted info on the Thank You page.

fields in the jetformbuilder form

WooCommerce Cart & Checkout Action Settings

In the menu, find the Post Submit Actions section. Click on the “New Action” button and select the “Add to Cart & Redirect to Checkout” option from the list.

add to cart action in the jetformbuilder form

Click the pencil-shaped button to open a settings pop-up. In the action settings, we need to connect the WooCommerce checkout fields with the corresponding form fields. Let’s resume all action options:

add to cart action in the jetformbuilder form
  • Get product ID from. This field contains two options —“Form Field” and “Manual Input,” which can help to determine where the form will get the product ID from. By selecting the first option, ID will be pulled dynamically from the corresponding Form Field. With “Manual Input,” we can specify ID manually;
  • Product ID field / Input product ID. Depending on the previous step selection, here, you can select the corresponding Product ID field from your form or input the Product ID manually;
  • WooCommerce Price field. In this dropdown, you need to select a field that stores the total price. If the form field is left empty purposefully, the price will be received from the post meta value;
  • Heading for Order Details. Type in the title that you want to show before the order data on the Checkout page;
  • WooCommerce order details. By clicking on the “Set up” button, you can configure a list of custom fields that will be displayed on the Thank You page and during the order preview in the dashboard. To put it otherwise, you can edit the form metadata here, which means that these order details will be the same for all Redirect to Checkout actions within one particular form. Let’s check out the settings:
    • Safe deleting. This toggle is active by default and prevents you from deleting items unintentionally. When it is on, the item will be only removed after you confirm that you need to remove it;
    • Label. You can provide the field label here;
    • Select form field. Pick the corresponding form field that you are willing to show on the Order Details list;
    • Add new item. Allows you to add another custom field;
    • Update. Click this button to save the changes and return to the action edit window;
    • Cancel. Click this button to return to the action edit window without saving the changes.
woocommerce order details set up window
  • WooCommerce checkout fields map. Here, you can connect the WooCommerce checkout fields to the corresponding form fields. By doing so, you get a partly pre-filled form after being redirected to the Checkout page.
NOTE

This addon allows adding just ONE item/product to the cart and redirecting the user to Checkout. Also, keep in mind the reload method. If you choose “AJAX” in the form settings, the redirect action will be executed after ALL post-submit actions only. If you select “Reload,” the redirect will happen immediately.

Redirect to Thank you Page

After everything is set and done, let’s add the form to the Single Product page and test it.

live form on front end

Fill in all info and press the “Proceed to Checkout” button. Then, we’ll be redirected to the Checkout page, where we need to add our billing and shipping information and place an order. As we added all form fields into Woocommerce order details, we can see them all here.

checkout page on the front end

Right after we place an order, we can see Thank You page that also contains all the data we submitted during the form.

ready thank you page

That’s all; now you know how to redirect the JetFormBuilder form to WooCommerce Thank You page on your WordPress website.

Tutorial requirements:

The JetEngine’s relations feature allows you to connect, create, and edit related items just on the editing page of posts, CCT items, users, and taxonomies.

But if you want to connect related items on the front end, you can do this via the form with the help of the JetFormBuilder plugin and the Gutenberg block editor.

Connect Child Objects to Parent Ones

Go to JetFormBuilder > Add New. Give the new form a title and leave the default settings of the Hidden Field block.

creating new jetformbuilder form

Click on the Toggle block inserter button and place the Select, Radio, or Checkbox fields to display the child items in the form. Be informed that the Radio and Select allow choosing one option and it suits the “One to Many” relation type, and the Checkbox allows selecting one and more options and it matches the “Many to Many” relation type, so we decided to drag-and-drop such Checkbox Field block to our form.

checkbox field block

Select the “Posts” as the source in the Fill Options From field and define the needed Post Type. As we want to choose the related children for the relationship “Country > Tours,” we have selected the “Tour” Post Type.

In the Block General settings, type the Field Label and change the Form field name.

NOTE

Be aware that all field names inside one form must be unique, and field names must contain a value with only lowercase letters in Latin, no spaces. If you want to split words, this can be done by using the “-” and “_” characters.

Press the “Dynamic tags” button in the Default Value field to open the pop-up.

checkbox field block settings

Pick the “Related Items” option in the Source field.

editing preset and choosing source

After that, you get the new additional settings:

  • From Relation. Define the relationship you want to use as the source;
  • From Object. Specify if you want to display children (Child object option) or parent (Parent object option) items;
  • Initial Object ID From. Indicate where the query will get the object ID from to display its related items in the form:
    • Current Object ID. Shows the related items of the current post, of the current active listing item, and so on;
    • Current User ID. Shows the related items of the currently logged-in user;
    • Queried User ID. Shows the related items of the selected user, e.g., on the User Page in the Profile Builder;
    • Query Variable. Shows the related items from the global request or WordPress request variables. If you select this option, the fourth Variable Name will appear;
    • Current Object Variable. Shows the related items from the object defined as current by JetEngine. If you select this option, the fourth Variable Name will appear;
    • Default WordPress Object (for current page). Always shows the related items of a current global object for the current page defined by WordPress, as opposed to the “From Relation” option.
  • Variable Name. This field appears if you select the “Query Variable” or “Current Object Variable” options. This option allows setting the variable’s name, which the plugin will search for in the query or current object.

In this case, we have picked the “Current Object ID” option in the Initial Object ID From field because we want to display the Tours child posts in the form on the Country parent post.

relation settings in the jetformbuilder

Press the “Update” button and move to the JetForm settings and the Post Submit Actions tab. Select the “Connect Relation Items” option and click on the pencil-shaped icon to edit the action.

connect relation items post submit action

In the new pop-up window, select the needed Relation. Pick the name of the Hidden Field (with the default “Current Post ID” option) as the Parent Item ID. As the Child Item ID, select the label of the created field for the related items (the Checkbox in our case). Since it’s needed to display the children objects in the form, choose the “We updating children items for the parent object” option in the Update Context field.

edit action

Push the “Update” button to save this action and click on the “+ New Action” button to create a new one.  Select the “Insert/Update Post” option and hit the pencil-shaped icon under this action.

insert update post submit action

Select the parent post type that you want to update via the form in the Post Type field.

Select the needed Post Status or leave it empty. Also, leave the default Fields Map values.

NOTE

Be aware that if you fill the Fields Map, the new related items replace the old ones instead of just being added to them.

edit insert update post submit action

Hit the “Update” button and publish or update the form to save the changes when you finish editing fields and actions.

To place the form on the parent object, proceed to the parent Post Type on the WordPress Dashboard and Edit the needed post.

parent post editing

Place the JetForm block in the post.

dding jetform to the post

Choose the needed Form to display in the Form Settings and push the “Update” button.

form settings

To reach the post on the front end, return to the post type and click on the “View” button of the parent post.

The form is now displayed in the post. Since we have added the Checkboxes field as the selector for the posts, you can select as many posts as you need. When you finish, press the “Submit” button.

NOTE

If some child posts are already related to the parent post, they will be ticked in the form placed on the parent post page. So, if you untick them, they will be disconnected from the parent post.

Return to the parent post editing page and scroll down to the Children tab. The options you have checked in the form will be added to the related posts list.

list of the children posts on the parent post

Now you can add the form to all desired parent posts.

Connect Child Objects to New Parent Post

Now let’s find out how to build a form that will make a new parent post and connect child objects to it.

Go to JetFormBuilder > Add New. Give the new form a title and delete the Hidden Field.

Click to edit the Text Field, it will be for the parent object name. Fill in the needed fields and remember to fill in the Name field appropriately, separate words with the “-” and “_” symbols, and use only lowercase Latin letters.

text field for the country name

The following field will serve as a selector for child items, so we add a Checkbox Field. During the field adjusting, focus on the Fill Options From and Post Type fields. Here you should select the correct source, the child post type.

checkbox for tour selecting

Moving to the Post-submit Actions tab, select the “Insert/Update Post” option and click on the pencil-shaped icon to edit the action.

insert update post submit action

In the appeared pop-up define the parent post type as the Post Type. Set the Post Status to “Published” and head to the Fields Map.

The displayed fields refer to those fields you have added to the form. The Text Field of yours should be connected to the “Post Title” and the following Checkbox Field left with the default option. 

Hit the “Update” button to save the result, and let’s add one more action by pressing the “+ New Action” button.

edit action

This time we select the “Connect Relation Items” post submit action.

connect relation items

Set the needed Relation, choose the “inserted-post-id” option as the Parent Item ID, choose the name of the Checkbox Field as the Child Item ID, and leave the Update Context field empty. In the How to Store the New Item field, you can select the most appropriate choice for you. When you finish, press the “Update” button.

edit connect relation items action

Feel free to add as many additional fields, as you need, for instance, the Media Field to add a picture to a new post. 

The final step here is to save the form, so push the “Publish” or “Update” button and head to the page where the form will be located.

Place a JetForm block on the editing page, and fill in the Choose Form field with the form’s name.

Set up the fields and form styles, and press the “Update/Publish” button to save the page.

 jetform on the single page in the Gutenberg editor

Check the front-end result. You can fill in the form with a title and relate some items to it. Finally, press the “Submit” button.

jetform on the front end

Head to the parent post type (“Country”, in our case) and search for the newly created post. Open it in the editor by pressing the “Edit” button next to the post title and check the attached children posts.

newly created parent post with related posts

Connect Parent Objects to Child Ones

Navigate to the WordPress Dashboard > JetFormBuilder > Add New. Give a title to the form. Leave the default Hidden Field block settings and create the field for the parent object items list.

For example, we have added the Radio Field block to have the ability to pick only one option in the form.

Select the “Posts” as the source in the Fill Options From field and define the needed Post Type. As we want to select the related parent for the relationship “Country > Tours,” we have chosen the “Country” Post Type.

In the Block General settings, type the Field Label and change the Form field name.

Press the “Dynamic tags” button in the Default Value field to open the pop-up.

radio field block

Preset in this form has the same settings and options as in the previous form, but in this case, you need to select the “Parent object” option in the From Object field and click on the “Update” button.

preset editing of the form

Move to the JetForm settings and the Post Submit Actions tab. Select the “Connect Relation Items” option and click on the pencil-shaped icon to edit the action.

In the new pop-up window, select the needed Relation. As the Parent Item ID, choose the label of the created field for the related items (the Radio Field in our case). Pick the name of the Hidden Field (with the default “Current Post ID” option) as the Child Item ID. Since it’s needed to display the parent object in the form, choose the “We updating parent items for the child object” option in the Update Context field.

edit connect relation items action

Push the “Update” button to save this action and click on the “+ New Action” button to create a new one.  Select the “Insert/Update Post” option and hit the pencil-shaped icon under this action.

Select only the Post Type of the parent items in the new pop-up and nothing more. Otherwise, the new related items replace the old ones instead of just being added to them.

edit insert update post action for parent object form
edit insert update post action for parent object form

Hit the “Update” button and publish or update the form to save the changes when you finish editing fields and actions.

To place the form on the child object, proceed to the child Post Type on the WordPress Dashboard, click to edit the needed post, and put the JetForm block in the post. Choose the needed Form to display in the Form Settings and push the “Update” button.

list of the parent posts on the child post

To reach the post on the front end, return to the post type and click on the “View” button of the child post.

The form is now displayed in the post. Select the needed parent object and press the “Submit” button.

form for the parent item on the front end

Connect Parent Objects to New Child Post

You can also build a form that will add a new child post and connect it to the parent at once.

Navigate to the WordPress Dashboard > JetFormBuilder > Add New.

Now you can delete all the Hidden and Text fields to avoid getting confused during editing.

We start with adding a Text Field for a new post name. Feel free to adjust this field as desired. Remember that the Name field shouldn’t include capital letters, spaces, and other special characters.

text field for children post name

The following field is for choosing a parent, so we select Radio Field to let users pick one option.

Select the “Posts” as the source in the Fill Options From field and define the needed Post Type. As we want to select the related parent for the relationship “Country > Tours,” we chose the “Country” Post Type.

In the Block General settings, type the Field Label and Form field name.

radio for parent post selection

Move to the JetForm settings and the Post Submit Actions tab. Select the “Insert/Update Post” option and click on the pencil-shaped icon to edit the action.

Pick the child post type in the Post Type menu and select the “Published” Post Status.

In the Fields Map, we define the ‘tour-name’ Text Field as a “Post Title” and leave the default “Select post property” in the ‘choose-country’ field.

Click on the “Update” button to save the result.

insert update children post submit action

Click on the “+ New Action” button to add a new one. Select the “Connect Relation Items” option and hit the pencil-shaped icon under this action.

Set the needed Relation, select the name of the Radio Field as the Parent Item ID, choose the “inserted-post-id” option as the Child Item ID, and leave the Update Context field empty. In the How to Store the New Item field, you can select the most appropriate choice for you. When you finish, press the “Update” button.

connect relation items action

Feel free to add as many additional fields, as you need, for instance, the Media Field to add a picture to a new post. 

The form is ready, so press the “Publish” or “Update” button. 

Go to the page you want to place the form. For instance, it can be a standard WordPress page.

Place the JetForm block onto the page editor, and pick a new form name in the Choose Form field.

Work on the other fields if you wish. Ultimately, press the “Update/Publish” button and go to the front end to check the final result.

jetform on the page in the Gutenberg editor

Now you can complete the form with the title and related parent. Click the “Submit” button to save the post and add a related item to it.

jetform for children posts creation on the front end

Let’s check if the new tour was added to the child post type. Head to the child post type and search for the new post. For instance, you can type in a post title in the search bar.

Once the post is opened, scroll down to the Related… tab. The parent post is now successfully connected.

newly created child post

That’s it. You know now how to connect the JetEngine relation items via the JetFormBuilder forms.

save form record action

Save Form Record is a post-submit action that stores the form entries in the database and makes them easily аccessible from the dashboard.

This action keeps complete information regarding the forms submitted by a user. It will include the data entered into the form fields, as well as performed post-submit actions and errors.

How to Use Save Form Record Action

Go to WordPress dashboard > JetFormBuilder > Forms. Open a previously created form and proceed to the Post Submit Actions section.

post submit actions section

Unfold it and click on the “New Action” button.

add new action

Select the “Save Form Record” option from the drop-down list. Click on the pencil-shaped button to edit the action and proceed to its settings.

select save form record

If you want to save the user’s IP address and User-Agent data, then enable the Store the IP address and other request headers switcher in a pop-up settings window. Don’t forget to update the action and form itself.

enabling save form record action

The form can be filled in and sent now.

sending a form on the front end

Once it’s submitted, you can proceed to the WordPress Dashboard > JetFormBuilder > Form Records tab.

submitted forms

When you open a submission, there will be a Form Record page displaying complete form information.

Now you know how to store the form data and easily review it in the WordPress dashboard.