Single line text (text box) field
One of the field types used most is the single line text, also known as a 'text box'. It can be used to submit anything from name, number, email to YouTube video ID. It is recommended to use the hyperlink field type for URL submission as it has http prefix check.
Template parameters available
{$< FIELDNAME >} = html safe
{$< FIELDNAME >_RAW } = raw output
Article template example
Let's say you would like to add the name of an organisation to your content. You can add a single line text field with the unique name 'organisation'. The Smarty template code to render the name in your template could look like this.
The Smarty IF statement has been added so that if there is no organisation name submitted nothing will show in the article (i.e. no empty h2 tag).
Single line text (text box) options
The above images show the possible settings including length of the textbox (in the form), maximum length (number of characters) of the text.
Attribute examples
class="textbox"
placeholder="Please fill in the name of your organisation"
style="width:100%;"