Form Control - Work in Progress

Form Control Service:

  • Here all form control service modules will be listed.
  • They are defined with details and usage parameters.
  • Please look for screenshots for more specific use.

_____________________________________________

Form control – select

Title : form_control.select
Purpose : to get dropdrop with mentioned options
Syntax :
Input Parameters : (optional) label=”label for dropdown”
(required) field=”ID”
(required) id=”name and id”
taxonomy=”taxnomy slug”
OR query=”formatted query”
OR posttype=”post type”
OR user-role=”user role slug”
OR predefined_values=”array”
(optional) required=”yes/no”
(optional) multiple=”yes/no” – if you want to select multiple options
(optional) class=”extra classes”
(optional) placeholder=”placeholder for dropdown”
(optional) selectAll=”true/  ” – if you want select all option
(optional) value=” ” – if you want show any prefilled value from option
Return Value : service will return select dropdown with applied values
Example 1 :
Code :
Output :
Description :  in code, query is pass in select service which bring back all published posts from classroom post type in descending order of post date
Example 2 :
Code :
Output :
Description :  in code post type is passed as argument to select service which will bring back all published posts from locate_us post type.

________________________________________________

Form control – text

Title : form_control.text
Purpose : to get text box with mentioned options
Syntax :
Input Parameters : (optional) label=”label for textbox”
(optional) addon_text=”any warning or note”
(required) field=”ID”
(required) id=”name and id”
(optional) required=”yes/no”
(optional) readonly =”yes/no”
(optional) class=”extra classes”
(optional) placeholder=”placeholder for textbox”
(optional) value= if you want show any prefilled value
Return Value : service will return textbox with applied values
Example 1 :
Code :
Output :
Description :  in short code, text service is called which is required, value is given as module.post.post_title and custom placeholder

________________________________________________

Form control – date

Title : form_control.date
Purpose : to get date calender with mentioned options
Syntax :
Input Parameters : (optional) label=”label for calendar”
(optional) formate=”required date format”
(required) field=”ID”
(required) id=”name and id”
(optional) required=”yes/no”
(optional) class=”extra classes”
(optional) placeholder=”placeholder for drodown”
(optional) value= if you want show any prefilled value
(optional) attr_string= if you want any extra parameters
Return Value : service will return date calendar
Example 1 :
Code :
Output :

__________________________________________________

Form control – trix_editor

Title : form_control.trix_editor
Purpose : to textarea with text and file manipulation options
Syntax :
Input Parameters : (optional) label=”label for calendar”
(required) field=”ID”
(required) id=”name and id”
(optional) required=”yes/no”
(optional) class=”extra classes”
(optional) form_type =”to seprate out textarea from label in divisions”
(optional) control_class==”parent div class (usually from grid)”
(optional) placeholder=”placeholder for textarea”
(optional) value= if you want show any prefilled value
Return Value : service will return textarea with editor options
Example 1 :
Code :
Output :

___________________________________________________

Form control – number

 

Title : form_control.number
Purpose : to get textbox with number input
Syntax :
Input Parameters : (optional) label=”label for textbox”
(optional) addon_text=”any warning or note”
(required) field=”ID”
(required) id=”name and id”
(optional) required=”yes/no”
(optional) readonly =”yes/no”
(optional) class=”extra classes”
(optional) placeholder=”placeholder for textbox”
(optional) value= if you want show any prefilled value
(optional) min=”minimun value for number val”
(optional) max=”maximun value for number val”
Return Value : service will return number input with applied values
Example 1 :
Code :
Output :
Description :  this will return number input with min=”1″ and max=”10″, placeholder as “add rating”
Updated on Oct 27, 2020