Skip to content
Extend Nette Forms for WordPress use.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
frontend
src
.gitignore
README.md
composer.json
composer.lock

README.md

wenprise-forms

Extend Nette Forms for WordPress use.

Basic usage: Nette Form

Usage

use Wenprise\Forms\Form;

$form = new Form;
wprs_form( $form );

// Set form method
$form->setMethod( 'POST' );

// Set form field
$form->addText('first_name', 'First Name');
$form->addSubmit( 'send', 'Save' );

// Validate form and get form data
if ( $form->isSuccess() ) {

	$values = $form->getValues();
	
	$first_name = $values->first_name;
			
}	

nonce field

$form->addCsrf('post-form', 'Nonce invaliadte');

WordPress Tinymce editor

Settings: https://codex.wordpress.org/Function_Reference/wp_editor

$form->addEditor('post_extra', 'Extra content', []);

Slider input

Setting: http://ionden.com/a/plugins/ion.rangeSlider/en.html

$form->addEditor('price', 'Price', []);

Data Picker

Setting: https://jqueryui.com/datepicker/

$form->addDatePicker('date', 'Date', []);

Color Picker

Setting: http://automattic.github.io/Iris/

$form->addColorPicker('color', 'Color', []);
You can’t perform that action at this time.