On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • Hi,

    This concerns an embedded form in a Migx calendar, with Migx Loop Collection and Blox, that due to this embedding doesn't work as it should.

    I have a long formz builder form, with some required fields. All is generated within Migx Calendar sections, which have an option list of the created formz in the backend.

    After one fills in the form, presses "submit" and a required field is not correct, the page reloads with a generic message "not all required fields filled in". All filled in data is lost, and a blanco form remains sad
    So users have to fill in the form again.
    I've seen online some other people suffering from this issue, but no solution ...
    Anybody ?

    form code:

    I call the custom made formz with
    [[!fmzForms? 
    &id=`[[+Event_form_chunk]]`
    &tpl=`formz_tpl_om`
    ]]


    The generic Formitcode, in which the FOrmz builder custom fields can merge:

    [[!FormIt?
        &hooks=`[[+action]]`
        &excludeFields=`submit`
        &formid=`[[+id]]` [[- "Form ID"]]
        &store=`1`
        &storeTime=`900`
        &successMessage=`<p>[[+success_message]]</p>`
        &validationErrorMessage = `not all required fields are filled in`
        &emailCC=`[[fi.email]]`
        &emailTo=`[[+email:default=``]]`
        &validate=`event:required,email:email:required,[[+validation]]`
        [[+validationText:notempty=`[[+validationText]]`]]
    ]]
    <h5>[[!+fi.successMessage]] [[!+fi.validation_error_message]] 
    </h5><div class="code html">
    
    <form class="form [[+identifier]]" action="" method="post">
        <fieldset>
            <div id="field_auto_wrap" class="">
                <label title="event" for="event">Event *</label>
                <input id="event" class="text " type="text" size="40" value="[[+Event_title]] --- [[+startdate:strtotime:date=`%d / %m / %Y`]]" name="event">
            </div>
            <div id="field_auto_wrap" class="">
                <label title="email" for="email">Uw e-mail *</label>
                <input id="email" class="text " type="text" size="40" value="[[fi.email]]" name="email">
            </div>        
            [[+fields]]
        </fieldset>
        <div class="actions">
            <input type="submit" name="submit" value="[[+action_button:default=`Submit`]]" class="btn primary" />
        </div>
    </form>


    The page uses this template: AGENDA Detail (migxCalendars)
    [[$template_agenda?
    &content_chunk=`content_agendadetail`
    ]]


    The chunk : content_agendadetail

    <section class="agenda-detail-page" style="margin-top: 70px;">
    [[!migxLoopCollection?
    &packageName=`migxcalendars`
    &classname=`migxCalendarDates`
    &joins=`[{"alias":"Event"}]`
    &where={"migxCalendarDates.id":"[[!getReqParam? &name=`date_id`]]"}
    &tpl=`tpl_agenda_detail`
    ]]
    </section>


    Thanks for helping me out here smiley [ed. note: sriananda last edited this post 1 year, 10 months ago.]