Download the PHP package qteab/qterest without Composer
On this page you can find all versions of the php package qteab/qterest. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download qteab/qterest
More information about qteab/qterest
Files in qteab/qterest
Package qterest
Short Description QTE Rest adds new endpoints for the Wordpress API
License
Informations about the package qterest
QTE Rest
This plugin can be used for making forms, newsletter signup (mailchimp) and search.
Installation
Follow these steps to install the plugin.
- Download the latest release as a zip.
- Go over to your wordpress admin panel.
- Go to "Plugins" and "Add New"
- Press "Upload Plugin" and select the file you downloaded earlier.
The plugin is now installed.
Contact
This part of the plugin handles the forms.
Creating forms
Creating forms can be done with qterest_render_form(array $args, bool $echo = true)
Arguments (array)
The following arguments are accepted
Fields
The following fields are accepted
Misc
It's also possible to put misc in the fields array. These miscs are accepted
Example form
This is a example of a very basic contact form
Filters and Actions
There is a few filters and actions available for you to customize som things
Messages
Example for customizing messages
The following messages can be changed
- name_empty
- email_empty
- email_invalid
- failed
- success
- mail_subject
- mail_body
- mail_to
Form submission data can be accessed through the $params parameter
Filter to remove attachments after request
You can use the following filter to remove attachments after a request
Formatting keys (ADMIN)
When looking at a contact request you can see that the name of the field identifies the value. This can be changed by adding a filter to display a better name for the customer. The filter name looks like this qterest_format_key_${key}.
You can also bulk format keys with the filter qterest_format_bulk_keys.
Fields
You can change the HTML of the fields with this filter. The filter name looks like this qterest_contact_field_${field_type}_html
Example of custom checkbox field
Frontend
QTE Rest provides basic javascript to make the forms asynchronous. It also triggers events if the form submission succeeds or fails.
There is 2 events available to listen on.
- qterestSubmitted
- qterestError
Example usage of the events `
MailChimp
MailChimp is very esay to use with this plugin. All you have to do is to add a API key in the settings page and select the list you want the users to be added to.
Subscribe form
There is a helper function available for rendering MailChimp forms.
Example
Filter
If you need to change the arguments of the field you can use the filter qterest_mailchimp_field_arguments.
Example usage of the filter
Coming soon
- Search Documentation
Future plans
- Form builder in React
- Frontend form in React
This plugin is built and maintained by Noah Olsson
All versions of qterest with dependencies
yahnis-elsts/plugin-update-checker Version ^4.8
phpoffice/phpspreadsheet Version ^1.10
guzzlehttp/guzzle Version ~7.8.1