[% # Form to edit a user page.title = 'Edit a User'; '

Simple form for updating a user profile. This uses macros to generate the HTML form.

'; WRAPPER form_wrapper submit_label = 'Update yourself!'; PROCESS user_data; PROCESS other_data; field( 'Write your bio', 'text' ); END; %] [% BLOCK user_data %]
User Data [% field('First name', 'first_name' ); field('Last name', 'last_name' ); field('Your US zip code', 'zip', 'Make one up!' ); field('Your email', 'email' ); field('Username', 'username' ); field( 'Password', 'password', 'Change your password' ); field( 'Retype password', 'password_chk' ); field('Your age', 'age', 'This is only for targeted advertising' ); field('Check to publish your personal info on the Internet', 'share' ); %]
[% END %] [% BLOCK other_data %]
Other Data [% field('What pets to you have?', 'pets'); field('What pets to you have?', 'pets2', 'using auto_widget_size'); field('What pets to you have?', 'pets3', 'explicit "widget"'); field('Are you married?', 'married' ); '

The type of widget used for Select fields depends on the number of options to display:

'; field('Favorite color', 'color', 'Only a few options' ); field('CSS color', 'css_color', 'A lot of options' ); field('Other color', 'optional_color', 'This is an optional list' ); field('Rate yourself', 'rating' ); field('Upload /etc/passwd', 'file' ); %]
[% END %]