Documentation / Tutorials / Awesome Services

Form Control - Work in Progress

/ Awesome Services / 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
Categories
Most Popular

Leave a Reply

Your email address will not be published. Required fields are marked *