0 0 0 0

NEX-Forms Documentation

Documentation & Tutorials for NEX-Forms version 8.0 and above

Using a Form in a WordPress Theme Template File

This article explains how to embed a form directly into a WordPress theme template file using PHP. By following these steps, you can seamlessly integrate NEX-Forms into your theme's design, allowing the form to display as part of the template wherever it’s needed.

In this Article

The NEX-Forms PHP Output Function
This is the NEX-Forms PHP Output Function, which can be used anywhere on your WordPress template files to display a form. Replace YOUR_FORM_ID with the actual ID of any form you’ve created. This ID links directly to your form, allowing the shortcode to output the associated form in your theme template file.

The second argument tells the function to echo (true) or to return (false) the output.
<?php NEXForms_ui_output(array("id"=>YOUR_FORM_ID),true); ?>
Adding a Form's Shortcode to a WordPress Page
  1. Log into your Wordpress Admin area.
  2. Edit or create a new form.
  3. Click on "EMBED" from main menu.
    NEX-Forms - Figure Arrow
    NEX-Forms - Create First Form - Figure - 11
  4. Click on "EMBED" from main menu.
    NEX-Forms - Figure Arrow
    NEX-Forms - Create First Form - Figure - 11
  5. Click on the "PHP" tab.
    NEX-Forms - Figure Arrow
    NEX-Forms - Create First Form - Figure - 12
  6. Copy the NEX-Forms PHP function.
    NEX-Forms - Figure Arrow
    NEX-Forms - Create First Form - Figure - 12
  7. Edit or create a new theme template file.
  8. Paste the NEX-Forms PHP function into your theme's template file.
Was this article helpful?
Yes
No
Still having trouble? How can we help you?
This article was last updated on 19 November 2024
Stay in Touch
Get the latest NEX-Forms news and info by following us on:
In this article