Nmwdhj is an API for creating forms elements via code.
Author: | Nashwan Doaqan (profile at wordpress.org) |
WordPress version required: | 3.1 |
WordPress version tested: | 4.0.33 |
Plugin version: | 1.3.4 |
Added to WordPress repository: | 25-06-2013 |
Last updated: | 29-11-2015
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
Rating, %: | 100 |
Rated by: | 2 |
Plugin URI: | http://wordpress.org/plugins/momtaz-nmwdhj/ |
Total downloads: | 1 473 |
Click to start download |
Important Notes:
- This plugin requires at least PHP 5.3.x .
- This plugin is for developers, not general users.
Nmwdhj is an API for creating, editing and rendering forms programmatically. This plugin doesn’t have a GUI, It’s only a helper library for the PHP & WP developers.
You can use this plugin to create individual form elements in the meta boxes, front-end, or anything else you might want a form for.
Basic Examples
You can use this plugin in many ways depending on your needs, this examples only for learning purposes:
-
Simple WordPress Search Form:
Nmwdhj\create_element( array( ‘type’ => ‘form’, ‘atts’ => array( ‘method’ => ‘GET’, ‘role’ => ‘search’, ‘action’ => home_url( ‘/’ ), ), ‘elements’ => array( ‘search’ => array( ‘name’ => ‘s’, ‘type’ => ‘input_search’, ‘value’ => get_search_query(), ‘atts’ => array( ‘placeholder’ => _x( ‘Search this site…’, ‘placeholder’ ), ‘class’ => ‘search-text’, ‘required’ => true, ), ), ‘submit’ => array( ‘type’ => ‘input_submit’, ‘value’ => __( ‘Search’ ), ), ), ) )->output();
-
Simple Login Form:
Nmwdhj\create_element( array( ‘type’ => ‘form’, ‘atts’ => array( ‘method’ => ‘POST’, ), ) ) ->add( array( ‘name’ => ‘user_name’, ‘type’ => ‘input_text’, ‘label’ => __( ‘User Name’ ), ) ) ->add( array( ‘name’ => ‘user_pass’, ‘type’ => ‘input_password’, ‘label’ => __( ‘Password’ ), ) ) ->add( array( ‘name’ => ‘user_submit’, ‘type’ => ‘input_submit’, ‘value’ => __( ‘Submit’ ), ) ) ->output();
Contributing
Developers can contribute to the source code on the Nmwdhj GitHub Repository.
ChangeLog