forms:searchbox
AJAX
ajax:delayedload ajax:event ajax:navigation ajax:region
Data
data:calendar data:column data:eventrepeater data:postrepeater data:productbrandrepeater data:productcategoryrepeater data:productrepeater data:repeater data:table data:template data:tree
Forms
forms:address forms:captcha forms:checkbox forms:checkboxgroup forms:codeeditor forms:combobox forms:datepicker forms:dialogbox forms:editbox forms:fileupload forms:form forms:hidden forms:money forms:officeuseregion forms:option forms:password forms:paymentmethod forms:radiobutton forms:radiobuttongroup forms:row forms:searchbox
ATTRIBUTES
EXAMPLES
forms:signature forms:slider forms:spinbox forms:submitbutton forms:submitimage forms:submitlink forms:successcontent forms:textarea forms:timepicker
Layout
layout:gallery layout:productgallery layout:rotator layout:stepper layout:stepperpanel layout:tablist layout:tablistitem
Logic
logic:dependency logic:else logic:if logic:include logic:parse logic:variable
Navigation
navigation:breadcrumbs navigation:item navigation:primary navigation:secondary
Personalisation
personalisation:firstname personalisation:fullname personalisation:lastname personalisation:other
Standard
standard:audio standard:embed standard:icon standard:image standard:link standard:script standard:tooltip standard:video
Templates
templates:button templates:card templates:column templates:fancybox templates:faq templates:flexlayout templates:header templates:row templates:section templates:styles templates:teammember templates:testimonial
Regions
regions:content regions:contentadditional regions:security regions:togglable
Third Party
thirdparty:googlemap thirdparty:googlemapmarker

<forms:searchbox />

Creates a widget which allows for quick AJAX data searching.

Related Tutorials

Attributes

allowNonPickedValues
string
Allow non-picked values when using component / datasource
autoFocus
bool
Auto Focus

If true, this control will attempt to focus itself after the page has loaded. Note that only one element may be focused on the page at a time.
Default = false
dataColumn
Sets the data column

The datacolumn links the form item to a key used when getting or saving from a component (as defined by the parent form).
dataValue
string
Value of the selected row
disabled
bool
Disable Input

Disables the input, preventing user interaction
height
string
Height

Sets the height of the element. The default units are pixels. include the percentage symbol % to user percentage values.
id
string
Most form items need a unique id so that they can submit data to the server. No two form items may have the same id. For situations where multiple form items submit to the same field, see the name attribute. Id's that begin with contact_ will automatically save Contact information to the Contact database as long as the user has entered enough identifying information (ideally Name and Email). Check the Contact Fields page for correct field names.
name
string
Sets the name of the form item. Most of the time, the id attribute will suffice. However, with form items that post multiple values into an array, each item will need to have the same name, followed by []. For example three controls with name="data[]", will all post into 'data'.
Radio buttons belonging to the same group will have to share the same name.
noResultsText
string
Text to be shown when no search results are found
saveState
bool
Restore state on reload

Whether the value of the input persists when the page is revisited.
Default = false
transformations
Value Transformations

Sets the value transformations to be applied to the value of the form item as a comma separated string.
validations
Validations

Sets the validations to be applied to the value of the form item as a comma separated string.

Eg: validations="mandatory"
width
string
Width

Sets the width of the element. The default units are pixels. include the percentage symbol % to user percentage values.

Tutorials

Examples

Search a Post

Use a search box to locate a post using a keyword

HTML:

<forms:form id="quicksearch"> <forms:row label="Search Blog Post"> <forms:searchbox id="search_blog" name="search_blog" component="\Components\Website\Posts" placeholder="Enter any keyword or blog title" as="blog" datavalue="$blog['post_id']"> [? $blog['post_title'] ?] </forms:searchbox> </forms:row> </forms:form>

Product Enquiry Form

Demonstrates an enquiry form that allows the user to search Products.

HTML:

<forms:form id="product_enquiry_form" recordsubmissions="true" contactmode="store" onsubmitemailsubject="Product Enquiry Form" onsubmitemail="true" method="ajax"> <forms:row label="First Name" type="one_column"> <forms:editbox id="contact_first_name" validations="mandatory" /> </forms:row> <forms:row label="Last Name" type="one_column"> <forms:editbox id="contact_last_name" validations="mandatory" /> </forms:row> <forms:row label="Email Address" type="one_column"> <forms:editbox id="contact_email" validations="mandatory,email" transformations="tolower" /> </forms:row> <forms:row label="Search Product Name" type="one_column"> <forms:searchbox id="search_product" name="search_product" component="\Components\Commerce\Products" placeholder="Enter product keyword, name, or item code" as="product" datavalue="$product['product_id']"> [? $product['product_title'] ?] </forms:searchbox> </forms:row> <forms:row label="Message" type="one_column"> <forms:textarea id="message" height="130" validations="mandatory" /> </forms:row> <forms:row type="one_column"> <forms:submitbutton>Send</forms:submitbutton> </forms:row> <forms:successcontent> <h2 style="text-align: center;">Thank you! We've received your enquiry.</h2> <p style="text-align: center;"> One of our staff will get back to you shortly. </p> </forms:successcontent> </forms:form>