Skip to content

Instantly share code, notes, and snippets.

@adamfairholm
Created October 25, 2011 06:35
Show Gist options
  • Save adamfairholm/1311570 to your computer and use it in GitHub Desktop.
Save adamfairholm/1311570 to your computer and use it in GitHub Desktop.
Sample Formojo Form: Bug Report
{mojo:formojo:form
form_class="form" form_id="bug_report_form"
notify1="email" notify1_layout="bug-thank-you" notify1_subject="Thanks for the Bug Report"
notify1_from="[email protected]|Example"
notify2="[email protected]|[email protected]" notify2_layout="bug-report" notify2_subject="New Bug Report"}
<p>Name: {name_error} {input:text name="name" label="Name" required="yes"}</p>
<p>Email: {email_error} {input:email name="email" label="E-mail" required="yes"}</p>
<p>Message:</p>
{message_error}
<p>{input:textarea name="message" required="yes"}</p>
<p>My Problem:
{input:dropdown name="problem"}
{option value="It won't work"}
{option value="It doesn't work" selected="yes"}
{option value="Not Working"}
{/input:dropdown}</p>
<p>This is:
{input:radio name="urgency"}
{option value="Urgent"} Urgent
{option value="Not a Big Deal" selected="yes"} Not a Big Deal
{/input:radio}</p>
<p>Contact Me via:
{contact_method_error}
{input:checkbox name="contact_method[]" required="yes"}
{option value="Email"} Email
{option value="Phone" selected="yes"} Phone
{option value="Pizza Delivery"} Pizza Delivery
{/input:checkbox}</p>
{send_newsletter_error}
<p>{input:yesno_check selected="No" name="send_newsletter"} Send me a newsletter.</p>
{input:hidden name="form_type" value="Bug Report"}
{input:random_id name="bug_id"}
<p>{submit}</p>
{/mojo:formojo:form}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment