Wiki Spaces

Documentation
Projects
Resources

Get Help from Others

Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack

Documentation

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You need to put a submit tag at the bottom of your form, or else your users will be very disappointed in you. Label/Code/Style attributes analogous to a section tag can be applied.

Attributes

  • submitLabel: Allows you to set the text of the submit button.
    • OPTIONAL
    • Value: Any String
    • Default: Messages from message.properties for htmlformentry.enterFormButton or htmlformentry.saveChangesButton depending on if form new form is being saved or existing form is being edited, respectively.
    • Since: 1.7.2
  • submitCode: Allows you to set the text of the submit button using an htmlformentry translation code
    • OPTIONAL
    • Value: reference to a translation code
    • Default: None
    • Since: 1.7.2
  • submitStyle: Allows you to set the style class for the submit button.  This attribute gets written into the rendered submit tag as class="<<submitStyle Value>>".
    • OPTIONAL

Example

...

    • Value: Valid CSS style attributes
    • Default: submitButton CSS style is referenced by default; if none is defined in the style section, no style will be applied 
    • since: 1.7.2

Example

  • Simplest example using defaults
    Code Block
    html
    html
    
    <htmlform>
        ...stuff goes here...
        <submit/>
    </htmlform>
    
  • Example of applying custom Class to a translated label
    Code Block
    html
    html
    
    <htmlform>
    <style>
        .customSubmit { font-weight: bold; }
    </style>
    <translations defaultLocale="en">
        <code name="submit_text">
            <variant locale="en" value="Close Flowsheet"/>
            <variant locale="fr" value="Not sure how to say it in French"/>
        </code>
    </translations>
        ...stuff goes here...
        <submit submitStyle="customSubmit" submitCode="submit_text" />
    </htmlform>
    
    <template>

See <repeat>

<translations>

...