This tag is replaced by the control's web input field.
Replace form with the name defined in name attribute of <b:form> tag.
Replace field with the name of the control.
Attributes
set(optional)
|
If set attribute is given, the form field will not be shown. Instead, the given value will be set for the contron when the form is submitted. This way you can set data without user interference. If the sendto attribute is diffrent from the page that the form is in, form fields with set attribute won't apply. Tip: You can also set metadata. See the example 2 |
Examples
Creating a form field
Let's assume we have a data model with a text field control named topic and a text area control named content.
We are giving the name fieldexample for the form.
<b:form name="fieldexample" datamodel="page"> <label>Topic: <b:fieldexample.topic /></label> <label>Content: <b:fieldexample.content /></label> <input type="submit" value="Create new page" /> </b:form>
Using set-attribute
To insert certain information to the newly created data, you can use the set attribute. This way the fields will be hidden from the user and they cannot interfere with the data being set to the fields.
<h1>Found a bug?</h1>
<b:form datamodel="comment" name="newbug">
<b:newbug.software set="<?php echo( $_SERVER['HTTP_USER_AGENT'] ); ?>" />
<b:newbug.referer set="<?php echo( $_SERVER['HTTP_REFERER'] ); ?>" />
<b:newbug.metadata.published set="2" />
<label>
Your e-mail:
<b:newbug.sender />
</label>
<label>
What did you encounter and how did it happen?
<b:newbug.comment />
</label>
<input type="submit" value="Post this comment" />
</b:form>

