Caldera Forms Getting Started: Adding A Form To A Template File Using Caldera_Forms::render_form();

Caldera Forms Banner

This getting started guide is for developers who want to render a form in a PHP theme template file. Accomplish this by using Caldera_Forms::render_form().

Adding A Form To A Page Template File

Create and add a Page Template File to WordPress. Get more information on creating and adding a template file to WordPress by visiting WordPress Page Template documentation.

Edit your PHP template file by opening it in any PHP editing software. Add the form by pasting the code Caldera_Forms::render_form( 'CF57cd8747beba8' ); within the body of the template file.

You are also able display Caldera Forms by using the form name as a parameter Caldera_Forms::render_form( array( 'name' => 'My Form Name' ) );. However if you have more than one form with the same name this will cause issues and it’s advised to rather use the Caldera Form ID.

Please note, that the Form ID within the parenthesis associates with a specific form. Get more information on finding a form’s shortcode by visiting our Shortcode guide.

 

Form Configuration API