Hobo Cookbook

View Source

Question: How do I change the order of fields in my form or show page?

Asks kevinpfromnm
It appear that by default text, date and text area input objects are shown
in a New or Edit page prior to any relational input objects, such as
dropdown combos. Is there any way to specify the order without resorting to
too much .dryml?

Regards

Christopher

Discussion

  • you just need the following in your application.dryml

    <extend tag="form" for="Yourmodel">
      <old-form merge>
        <field-list: fields="field2, field1... etc"/>
      </old-form>
    </extend>

    or in your app/views/model_name/show.dryml

    <show-page>
      <field-list: fields="field2, field1, ..." />
    </show-page>