Adding a Preview tab to form - CF8
Posted on September 23, 2007, under
ColdFusion
| 12773 Views
This is a quick entry showing how you can use the new cflayout tabs and the bind attribute of the cfdiv tag to quickly add a preview tab to a textarea form field.
<form action="" method="post">
<cflayout type="tab">
<cflayoutarea title="entry">
<textarea name="textentry" rows="15" cols="50"></textarea>
</cflayoutarea>
<cflayoutarea title="Preview">
<cfdiv bind="{textentry}">
</cflayoutarea>
</cflayout>
<input type="submit" value="Save">
</form>
<cflayout type="tab">
<cflayoutarea title="entry">
<textarea name="textentry" rows="15" cols="50"></textarea>
</cflayoutarea>
<cflayoutarea title="Preview">
<cfdiv bind="{textentry}">
</cflayoutarea>
</cflayout>
<input type="submit" value="Save">
</form>
Edit - added demo page:
Demo Link
Edit 2 - added rich text example: Rich Text demo
