Add 'Event Submission Form' into a page template.

Home Forums Welcome! Pre-Sales Questions Add 'Event Submission Form' into a page template.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1064723
    Danielle
    Participant

    We’re using this plugin with Simple Membership plugin. Bc the submit event form isn’t on a particular page we cannot restrict its content to membership levels.

    Simple Membership gave us a link to a page with code to try to put in the submit-an-event-form template if there is one to see if this works.

    Code is:
    Show specific content to a particular member:
    `$member_id = SwpmMemberUtils::get_logged_in_members_id();
    if ($member_id == “2”){
    echo “Hi, your member ID is 2”;
    }’

    My question is where can I put this code to test it in the backend? Is there a template page or a file someone in the Community Events backend that draws up the form or a file that IS the form entirely?
    Or can you advise me how to add the submit-an-event URL to this code somehow so it reads the restriction on the URL to restrict it.

    Any advice would be greatly appreciated.
    Recommendations?

    #1064724
    Danielle
    Participant

    Or is there a way to add the form into a page template somehow so I can add it to a page and restrict it normally?

    #1064997
    George
    Participant

    Hey Danielle,

    Thanks for reaching out. While the answer to your second question (“is there a way to add the form into a page template somehow so I can add it to a page and restrict it normally?”) is unfortunately “No”, the answer to your first question (“Is there a template page or a file someone in the Community Events back-end that draws up the form or a file that IS the form entirely?”) is “yes”.

    The specific page template that renders the Community Events submission form is found within the Community Events plugin files at this location:

    src/views/community/edit-event.php

    While we cannot help with code customizations, we do have a great resource for template modifications here → https://theeventscalendar.com/knowledgebase/themers-guide/

    If you follow the principles in this guide and tinker around with that membership-related code on that Community Events file I mentioned, you might be able to pull off what you’re trying to do here.

    I hope this information helps!
    George

    #1079326
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Add 'Event Submission Form' into a page template.’ is closed to new replies.