Twitter Feed

Xataface Maillist

Sign up to receive the Xataface news letter with weekly updates and development tips.

 
Found 1 of 138 records in table Wiki
Now Showing 1 of 1

Current Record: widget:atts

widget:atts

[Permalink]

widget:atts Directive Reference

The widget:atts directive in the fields.ini file allows any arbitrary HTML attributes to be added to any of the fields. It may also be used to specify javascript event handler functions that the widget should call upon the specified event. In particular, here are some examples of possible widget:atts directives:

Available Widget Event Handlers

name description version
widget:atts:size? This directive sets the length of the input area a text box field, but it does not limit the number of characters that can be entered. For example:
widget:atts:size = 50
?
widget:atts:maxlength? This directive limits the maximum number of characters that can be entered into a text box field. For example:
widget:atts:maxlength = 25
?
widget:atts:style? This directive specifies the style (font-size, font-family, etc.) for the field. For example:
widget:atts:style = "font-size: 24pt; font-family: Apple Chancery"
?
widget:atts:rows? This directive specifies the number of rows for a text area field to display. For example:
widget:atts:rows = 10
?
widget:atts:cols? This directive specifies the number of columns for a text area input field (1 character = 1 column). For example:
widget:atts:cols = 10
?
widget:atts:onchange? This directive will cause the specified javascript function to be called with the value of the field whenever its value is changed (i.e. when you change the field and tab out of it). For example:
widget:atts:onchange = "doJsFunction();"
?
widget:atts:onclick? This directive will cause the specified javascript function to be called with the value of the field whenever it is clicked. For example:
widget:atts:onclick = "doJsFunction();"
?

Helpful tutorials

See the bottom of this page in the Getting Started tutorial for more details on the basic directives above:

Customizing Field labels, descriptions, and widgets

This tutorial talks about how to use the javascript directives:

http://xataface.com/documentation/how-to/custom_javascripts

blog comments powered by Disqus
Powered by Xataface
(c) 2005-2018 All rights reserved