• Resolved julio75

    (@kingkurt)


    Is it possible to place a placeholder text in a custom form field (#_ATT) of submission form ?

Viewing 6 replies - 1 through 6 (of 6 total)
  • No, but when you create a custom event attribute it will automatically add a field to fill out in the submission form (for the custom event attribute).

    Thread Starter julio75

    (@kingkurt)

    Yes, but there is no placeholder text in the field like in the “name of the event” field for example where you have a placeholder text “name of the event”.

    I would like to have a placeholder text in #_ATT fields. Not just an empty field

    Okay, now I understand what you meant. I don’t see anyway to create placeholder text for these fields.

    https://wp-events-plugin.com/documentation/event-attributes/

    Thread Starter julio75

    (@kingkurt)

    o.k. I was hoping that it could be possible with a function.

    I’m also wondering that when I try:
    #_ATT{Field Label}{Default Value}?– Text event attribute, with a default value if not defined

    It shows absolutely nothing in the text field

    You could make the default value as the placeholder value as follows.

    Copy wp-content/plugins/events-manager/templates/forms/event/attributes-public.php to wp-content/plugin-templates/events-manager/forms/event and then add a placeholder to the input field. Change line 26 to this:

     <input type="text" name="em_attributes[<?php echo esc_attr($name) ?>]" <?php if (!empty($attributes['values'][$name])) echo 'placeholder="' . esc_attr($attributes['values'][$name][0]) . '"'; ?> value="<?php echo array_key_exists($name, $EM_Event->event_attributes) ? esc_attr($EM_Event->event_attributes[$name]):'' ?>" />
    
    Thread Starter julio75

    (@kingkurt)

    Thank you very much ! Works very good.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Placeholder text in #_ATT field’ is closed to new replies.