• Resolved ardph

    (@ardph)


    Thanks for this nice frontend-eme plugin and the eme-plugin. However I have a problem.
    In my form_test.php I made the following changes/additions, resulting in two additional input fields:

    <div class="input">
    	<label for="event_single_event_format"><?php _e('template form id=2','events-made-easy-frontend-submit'); ?></label><br />
    	<?php EMEFS::required_field('event_single_event_format'); ?>
    </div>
    
    <div class="input">
    	<label for="event_registration_form_format"><?php _e('template vrijwilligers id=1','events-made-easy-frontend-submit'); ?></label><br />
    	<?php EMEFS::required_field('event_registration_form_format'); ?>
    </div>

    I have two templates. With those those templates I can get what I want. But …. I do not know or understand or find what kind of input I have to give in the two additional input fields of the eme-frontend submit page.

    What I did find is that if I make those fields textareas and put the the text of both templates in those fields, the eme-frontend plugin does exactly what I want. But for an eme-frontend-way-of-living for my volunteers this is not very comfortable and I don’t want them in my WordPress backend.

    The texts of my templates are (at present it’s all on my local host):

    id=2

    <strong>Vrijwilligers voor rondleidingen op afspraak in de Dwingeloo Radiotelescoop op #_STARTDATE{l j F Y} van #_STARTTIME tot #_ENDTIME uur
    </strong>#_NOTES
    
    Aangemelde vrijwilligers<em>[eme_bookings id=#_EVENTID template_id=4]</em>
    
    #_ADDBOOKINGFORM
    #_CANCELBOOKINGFORM
    
    Terug naar het overzicht in <strong><a href="https://localhost/camrastransipbackup3/frontend-vrijwilligers/">Frontend vrijwilligers</a></strong>.

    id=1

    <div style="max-width: 400px;">
    <div class="eme-rsvp-form">
    <br/>
    <div><strong> * = verplicht veld</strong></div>
    <br/>
    <div>#_SEATS</div>
    <div>ACHTERNAAM *#_LASTNAME</div>
    <div>VOORNAAM *#REQ_FIRSTNAME</div>
    <div>E-MAIL *#_EMAIL</div>
    <div>INVULROOSTER * (vink tenminste één aan)</div>
    <div>#_FIELD{2}</div>
    <br/>
    <div>OPMERKINGEN:#_COMMENT</div>
    </div>
    </div>
    #_SUBMIT{Verzend je aanmelding}

    May be I’m asking something which is not possible in this eme frontend plugin, but I hope I’m overlooking something.

    Ard H https://www.camras.nl

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Franky

    (@liedekef)

    Hi Ard,

    it seems a bit unclear to me what you want to achieve. Your initial setup should be (adding “textarea):

    <div class="input">
    	<label for="event_single_event_format"><?php _e('template form id=2','events-made-easy-frontend-submit'); ?></label><br />
    	<?php EMEFS::required_field('event_single_event_format','textarea'); ?>
    </div>
    
    <div class="input">
    	<label for="event_registration_form_format"><?php _e('template vrijwilligers id=1','events-made-easy-frontend-submit'); ?></label><br />
    	<?php EMEFS::required_field('event_registration_form_format','textarea'); ?>
    </div>

    That will then allow people to enter the single event format and the registration form format. Your comment “template vrijwilligers id=1” or “template form id=2” are just text info, nothing else (php echo).
    If you want people to always use that layout for those 2 options, you can set those as default in the EME backend for new events (not a template then) or indicate in the form (via hidden fields) that you want to use those templates (you need to use “property” there because those settings are handled differently):

    <?php EMEFS::property('event_single_event_format_tpl','hidden',"value=2");
           EMEFS::property('event_registration_form_format_tpl','hidden',"value=1");
     ?>
    
    Thread Starter ardph

    (@ardph)

    Hi Franky,

    Your sugestion

    <?php EMEFS::property('event_single_event_format_tpl','hidden',"value=2");
           EMEFS::property('event_registration_form_format_tpl','hidden',"value=1");
     ?>

    does not work.
    The values of the event-property of a single event (made by the frontend EME plugin) in the SQL-database don’t change. They are and keep:”

    s:29:"event_single_event_format_tpl";i:0;
    s:34:"event_registration_form_format_tpl";i:0;

    When I change these values in the SQL-database to:

    s:29:"event_single_event_format_tpl";i:2;
    s:34:"event_registration_form_format_tpl";i:1;

    everything works as I intended.

    So my question is why does EMEFS::property and so on and so on, not change the value of the event_xxx_format_tpl? On this moment I cannot find what’s going wrong deeper in the software. So at this moment I don’t want to close this support question.

    I did not yet try your suggestion to put the templates as default in the EME backend for new events. That may be the last escape for now. However I don’t like this so much because the templates “1 and 2 of my problem” are typical for voluteer-activities and very different from what we ask our regular visitors.

    Plugin Author Franky

    (@liedekef)

    Let me test that out myself. It should work, but there’s always the possibility that there’s a bug somewhere.

    Plugin Author Franky

    (@liedekef)

    I fixed some issues in the plugin for hidden properties (those were ignored) and some other stuff while I was at it ??
    Please try the latest release (1.0.71).

    Thread Starter ardph

    (@ardph)

    Hi Franky,

    The latest release (1.0.71) solved the problem. I’m glad I submitted this problem to you, after spending some days and nights without progress. Thank you for the solution. Tomorrow, I will look into the software to find out what you have changed. From now on I can concentrate on tweaking the templates in order to make life easier for our volunteers when they apply for telescope time.

    The thread can be closed.

    Ard H

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Input problem’ is closed to new replies.