Skip to content

Instantly share code, notes, and snippets.

@monken
Created June 30, 2009 08:32
Show Gist options
  • Save monken/138067 to your computer and use it in GitHub Desktop.
Save monken/138067 to your computer and use it in GitHub Desktop.
$form->populate( {
auto_fieldset => { id => 'fs_login_form' },
elements => [
{ type => 'Block', tag => 'dl', elements => [
{ type => 'Block', content => 'Username', tag => 'dt' },
{ type => 'Block', tag => 'dd', elements =>
{ type => 'Text',
name => 'login_login',
constraints => [qw|Required|],
},
attrs => { class => 'data' },
}
] } ],
} );
# gives me
<form action="" method="post">
<fieldset id="fs_login_form">
<dl>
<dt>
Username
</dt>
<dd class="data">
<div class="text">
<input name="login_login" type="text" />
</div>
</dd>
</dl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment