Ignacio,

Here you go.  Both this examples are being used on the same page.

Working as expected:

   <def tag="adjust-record-button">
      <a href="#adjust-record-modal-#{this.id}" data-toggle='modal'
   class="icon-edit" />
      <modal id="adjust-record-modal-#{this.id}">
        <modal:>
          <modal-header>Adjust Record</modal-header>
          <formlet updates="#collection"
   
success="$('#adjust-record-modal-#{this.id}').modal('hide');$('.modal-backdrop').hide();">
            <div class="modal-body">
              <field-list: fields="name, number_of_weeks"/>
            </div>
            <modal-form-footer/>
          </formlet>
        </modal:>
      </modal>
   </def>

Working with the "with" attribute:

   <def tag="change-starts-on">
      <modal-open-button modal="change-starts-on-modal">Change Starts
   On</modal-open-button>
      <modal id="change-starts-on-modal">
        <modal:>
          <modal-header>Change Starts</modal-header>
          <formlet with="&this" updates="#collection"
   
success="$('#change-starts-on-modal').modal('hide');$('.modal-backdrop').hide();">
            <div class="modal-body">
              <input:starts_on/>
            </div>
            <modal-form-footer/>
          </formlet>
        </modal:>
      </modal>
   </def>

Non working (no "with"):

   <def tag="change-starts-on">
      <modal-open-button modal="change-starts-on-modal">Change Starts
   On</modal-open-button>
      <modal id="change-starts-on-modal">
        <modal:>
          <modal-header>Change Starts</modal-header>
          <formlet updates="#collection"
   
success="$('#change-starts-on-modal').modal('hide');$('.modal-backdrop').hide();">
            <div class="modal-body">
              <input:starts_on/>
            </div>
            <modal-form-footer/>
          </formlet>
        </modal:>
      </modal>
   </def>

I have moved the use of the tag to various places on the page and there has been no change in behaviour.

I also tried to create a test application that exhibits this behaviour, but was unsuccessful: I don't know what triggers the problem.

Henry

On 28/09/14 02:31 AM, Ignacio Huerta wrote:
Hi Henry,

Can you share a working and non-working example? I would love to take a
look at that.

Warm regards,
Ignacio

El 26/09/14 a las #4, Henry Baragar escribió:
Hello,

When I use a formlet, sometimes I have to include a 'with="&this"'
attribute, and other times I don't need it. Would anybody have an
explanation.

BTW, I only use formlets within modals.

Henry


--
Henry Baragar
Instantiated Software Inc.
http://www.instantiated.ca

<<attachment: Henry_Baragar.vcf>>

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to