• Resolved ockent

    (@ockent)


    How do i use the custom field to add a line for ‘Sex’?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Ashok Dudhat

    (@ashokdudhat)

    Hi,

    You can add any custom field, please follow this.

    https://www.wp-eventmanager.com/documentation/adding-new-field-event-submission-form/

    Thanks

    Thread Starter ockent

    (@ockent)

    I’m still not sure how to create the custom field to allow users to select their sex, male or female on the frontend form.

    Plugin Author Ashok Dudhat

    (@ashokdudhat)

    Hi,

    As i have mentioned in above link you have to use filter and then you can create any custom fields.

    Open up your theme functions.php field and create a function to append a new field to the events section. First hook it in:

    add_filter( ‘submit_event_form_fields’, ‘frontend_add_country_field’ );
    Then write the function:

    function frontend_add_country_field( $fields ) {
    $fields[‘event’][‘event_country’] = array(
    ‘label’ => __( ‘Country ($)’, ‘event_manager’ ),
    ‘type’ => ‘text’,
    ‘required’ => true,
    ‘placeholder’ => ‘e.g. germmany’
    );
    return $fields;
    }

    This adds a event text field at the bottom of the events form that has the label “Country”, is required, has no placeholder.

    Fields added using the above code will be saved to the event listing automatically.

    https://www.wp-eventmanager.com/documentation/adding-new-field-event-submission-form/

    During this week, we will launch visual field editor for the admin side so you can create any custom field without writing any code.

    I hope that it will help you.

    Hi @ockent,
    We have launched new version 1.9 with field editor feature.You can edit or add your fields from your admin side.

    Let me know if you have any issue in field editor.

    Thank you.

    Thread Starter ockent

    (@ockent)

    Thank you @hiteshmakvana

    Any plans to include state and city selection?

    Hi Ockent,

    We don’t have any plans to include because we have already given field editor to change or add fields so we don’t need to give more extra fields.

    Thank you

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Custom field for sex’ is closed to new replies.