Download the PHP package develtio/wp-forms without Composer
On this page you can find all versions of the php package develtio/wp-forms. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package wp-forms
Develtio Forms
Plugin that allows you to create and manage forms. Each created form generates a new post type and saves all sent data as separate fields in WP administration.
Use
We use the Nette From library to building the forms (https://doc.nette.org/en/3.0/forms)
Example
Example with CSV export for CPT
Templates
Form template
By default, the fields will be displayed below each other, Nette Forms provides a modification of this display presented here https://doc.nette.org/en/3.0/form-rendering
Alternatively, you can manually set the display of the form with $instance->setTemplate($template);
and special fields names field-name_field
and field-name_error
if you want to use forms as a shortcode.
Example
If the shortcode is not going to be used, you can create a template using, references $form['field-name']->control
and $form['field-name']->error
instead field-name_field
and field-name_error
Success template
You can Customize thank you message in this way:
Confirm template
Method | Params | Description |
---|---|---|
$mail->setConfirmTemplate( $tempalte ) |
html or path to file | full mail confirm template |
$mail->setConfirmTemplateContent( $content ) |
html or string | mail content |
$mail->setConfirmTemplateTitle( $title ) |
html or string | mail title |
Mail template
Method | Params | Description |
---|---|---|
$mail->setMailTemplate( $tempalte ) |
html or path to file | full mail template |
In the place where the data should be displayed, place the {content}
string.
Display
The form can be displayed in two ways. You can create your own function based on the instance $instance->form
and display it in the appropriate place on the page,
or You can use a shortcode that is generated automatically from the form name e.g. Sample form
creates [sample-form]
shortcode.
All versions of wp-forms with dependencies
composer/installers Version ^1.0 || ^2.0
nette/forms Version ^3.0
swiftmailer/swiftmailer Version ^6.2