Events Made Easy Forums How do I … Dynamic form field placeholder substitutions

  • This topic has 11 replies, 2 voices, and was last updated 7 years ago by Anonymous.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #56889
    Anonymous
    Inactive

    I want to use my booking form to collect extra data for each seat that is registered, so that I end up with Name/Email of every attendee in addition to the person who booked.

    I have added the following recurrence:
    #_SPACES greater than 1, Template X, Repeat Yes, Group 1

    In my form format I have added #_DYNAMICDATA between the end of the fields table and the submit button.

    I have created a template called X type All, with the following content:

    <table class='eme-rsvp-form'>
                <tr><th scope='row'>First Name*:</th><td>#REQ_FIRSTNAME</td></tr>
                <tr><th scope='row'>Last Name*:</th><td>#_LASTNAME</td></tr>
                <tr><th scope='row'>E-Mail*:</th><td>#_HTML5_EMAIL</td></tr>
    </table>

    When I go to my form and increase the seats required beyond 1, I get duplicates of the template, but the placeholders are not substituted for form fields. They are just printed as text, e.g. ‘Last Name*: #_LASTNAME‘.

    Am I approaching this completely the wrong way, or just missing some detail? I’ve trawled the docs and forums and still am not seeing it, so apologies if it is obvious.

    P.S. loving the plugin so far!

    Thanks
    Richard

    #56890
    Franky
    Keymaster

    Your logic is almost correct: you can ask for extrta info, but just not for “main info” (like #_LASTNAME etc ..). You can just ask for extra info for custom fields you created.
    So create a field for extra lastnames, aother one for firstnames and call that one in your template (using #_FIELD{xx} syntax)

    #56892
    Anonymous
    Inactive

    Thanks for the speedy response. Just using custom fields does indeed fix the problem – the fields now appear correctly.

    But when I submit data into the custom fields (either in the main part of the form, or the dynamic section) it seems to get ‘lost’. By that I mean:

    1) I have #_FIELDS in my contact emails, and that prints just a blank line

    2) If I go in to edit a pending registration, the fields appear blank. If I enter data and update, then go back in, the fields are again blank.

    My custom fields are all just text fields, with no extra settings except that they are required fields.

    Also these fields don’t appear as columns in the CSV or Printable View of the event.

    Is there something extra I need to do to ‘associate’ the custom fields with the event or something like that?

    #56895
    Franky
    Keymaster

    Read the doc on dynamic fields, #_FIELDS is not appropriate there, use #_DYNAMICDATA
    But if you have problems with storing the data, it won’t show anything.
    Check your logfiles first, maybe there’s some database problem …

    #56898
    Anonymous
    Inactive

    Neither #_FIELDS nor #_DYNAMICDATA print anything. (I have custom fields in the non-dynamic section, which should presumably be printed via #_FIELDS).

    I’m still working on getting log data – I don’t have access to the config files right now, and this is a live site so all the debug info is probably turned off.

    Are the custom fields responses supposed to be written into the wp_eme_answers table? According to the database status in the dashboard, that table only ever has one record in it, so that would suggest it is failing to write.

    I initially installed v2.0.0 of the plugin, before upgrading to v2.0.1. I saw the changelog about some tables not being created in 2.0.0. Is there anything else I need to do to rectify that besides updating the plugin?

    Thanks

    #56899
    Franky
    Keymaster

    It should indeed appear in the answers table.
    But 2.0.1 should be ok.
    These are the columns you should have in that table:
    answer_id int(11) NOT NULL,
    booking_id mediumint(9) DEFAULT 0,
    person_id mediumint(9) DEFAULT 0,
    member_id mediumint(9) DEFAULT 0,
    field_id int(11) DEFAULT 0,
    answer text NOT NULL,
    grouping int(11) DEFAULT 0,
    occurence int(11) DEFAULT 0,

    #56900
    Anonymous
    Inactive

    The table structure looks correct from my sql dump.

    If I empty the table it works for the first booking (for simplicity I now just have one custom field, and not dynamics). It’s as though the table can only have one record in it.

    #56901
    Franky
    Keymaster

    That would be rather impossible, but I’ll try a local fresh install of WP and EME

    #56902
    Franky
    Keymaster

    Thanks for insisting on this problem, and you’re correct: I forgot to add the auto_increment for new installations to the answer_id column (although currently I don’t need it …)
    So I’ll add it again, otherwise indeed it will fail to add extra records. I’ll release an update today.

    #56903
    Anonymous
    Inactive

    No problem – as a developer myself I know every support case is some combination of user error and actual bug! Thanks a lot for the prompt responses.

    #56904
    Franky
    Keymaster

    I just released a new version that should fix this.

    #56918
    Anonymous
    Inactive

    Great thanks, looks to have fixed it, I’ll test more fully once I’ve finished my form.

Viewing 12 posts - 1 through 12 (of 12 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top