Sha256: 99f7b7edf6d7c97c0416463af0362de37ef7a8790dcfd8d4cf4f6f63112e6a53

Contents?: true

Size: 1.76 KB

Versions: 33

Compression:

Stored size: 1.76 KB

Contents

<!--
`<formlet>` works like an AJAX `<form>` without actually being an AJAX `<form>`.  This is useful in scenarios where forms aren't allowed or are problematic, like inside of another form.

### Attributes

 - standard Hobo HTML attributes (id, part, et cetera).  All supported.

 - standard Hobo AJAX attributes:  (see [the cookbook](http://cookbook.hobocentral.net/api_taglibs/rapid_forms) )

   - `update`: (optional).  The DOM ID's of parts to update.  Note that you get an AJAX formlet whether this is provided or not.

   - `message`: the spinner message

   - `spinner-next-to`: DOM id of an element to position the ajax progress spinner next to.

   - `before`, `success`, `error`, `complete`: These callbacks are slightly different from the standard form callbacks.  They are called with "this" set to the formlet.  Also, you may pass in a function name rather than a javascript fragment.  If the before callback returns false, it will cancel the submission.

   - `confirm`: a message to be displayed in a JavaScript confirm dialog. By default there is no confirm dialog

   - not supported: `type, script, params, reset-form, refocus-form, result-update`.  None of these are particularly hard to support.  Email or post a message to the list if you need them.

 - standard Hobo Form attributes (all supported):

   - `hidden-fields`

   - `action`

   - `method`

   - `web-method`

   - `lifecycle`

   - `owner`
-->
<def tag="formlet" polymorphic attrs="element">
<%
  body, html_attrs, ajax_attrs, form_attrs = form_helper(attributes, parameters)
  element ||= 'div'
  unless body.nil?
    add_classes!(html_attrs, "formlet")
    add_data_rapid!(html_attrs, :formlet, :form_attrs => form_attrs, :ajax_attrs => ajax_attrs)
%>
    <%= element(element, html_attrs, body) %>
<%
  end
%>
</def>

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
hobo_rapid-2.2.6 taglibs/forms/formlet.dryml
hobo_rapid-2.2.5 taglibs/forms/formlet.dryml
hobo_rapid-2.2.4 taglibs/forms/formlet.dryml
hobo_rapid-2.2.3 taglibs/forms/formlet.dryml
hobo_rapid-2.2.2 taglibs/forms/formlet.dryml
hobo_rapid-2.2.1 taglibs/forms/formlet.dryml
hobo_rapid-2.2.0 taglibs/forms/formlet.dryml
hobo_rapid-2.1.2 taglibs/forms/formlet.dryml
hobo_rapid-2.1.1 taglibs/forms/formlet.dryml
hobo_rapid-2.1.0 taglibs/forms/formlet.dryml
hobo_rapid-2.1.0.pre4 taglibs/forms/formlet.dryml
hobo_rapid-2.1.0.pre3 taglibs/forms/formlet.dryml
hobo_rapid-2.1.0.pre2 taglibs/forms/formlet.dryml
hobo_rapid-2.1.0.pre1 taglibs/forms/formlet.dryml
hobo_rapid-2.0.1 taglibs/forms/formlet.dryml
hobo_rapid-2.0.0 taglibs/forms/formlet.dryml
hobo_rapid-2.0.0.pre10 taglibs/forms/formlet.dryml
hobo_rapid-2.0.0.pre9 taglibs/forms/formlet.dryml
hobo_rapid-2.0.0.pre8 taglibs/forms/formlet.dryml
hobo_rapid-2.0.0.pre7 taglibs/forms/formlet.dryml