Require image or provide help text at that field.

Home Forums Calendar Products Community Events Require image or provide help text at that field.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1189568
    Larry Bradshaw
    Participant

    On the Community Events, can we require that they upload a photo for their event?
    and/or is there away to edit the php to provide specific text for uploading the image in this location?

    I tried adding a snippet for the HTLM instructional text at the top of the form, but it’s too far away from the image field and cause display problems for the form.

    #1189750
    Geoff
    Member

    Hey Larry,

    I have not been able to find a way to make the image upload a required field. In fact, it seems to be the one item not covered in this guide and I was unable to see anything in our source code that would allow to happen.

    That said, I have run this question by others on the team and, though nothing has come out of it, I’d be happy to update this thread if we land on something.

    You can absolutely customize the Community Events form template to add instructional text above the image upload field. To do that:

    • Make a copy of the following file: /wp-content/plugins/the-events-calendar-community-events/src/views/
    • Make a new folder in your theme called tribe-events
    • Make a new folder in that one called community
    • Make a new folder on that one called modules
    • Add your copied image.php file to that folder

    Now that the template is in your theme, you can modify it to suit your needs. In this case, add your instructive text wherever you would like it to appear. A good place to start might be adding a paragraph right after this line:

    <h4 class="event-time"><?php printf( esc_html__( '%s Image', 'tribe-events-community' ), tribe_get_event_label_singular() ); ?></h4>
    <p>Your custom text!</p>

    Will this help you get started? Please let me know?

    Cheers,
    Geoff

    #1189779
    Larry Bradshaw
    Participant

    Thank you! That worked. I really appreciate it.

    #1189827
    Geoff
    Member

    My pleasure! Happy that helps and I appreciate your following up to let me know. 🙂

    As promised, I will certainly updated this thread if I come across a method for making the image upload a requirement field. In the meantime, definitely let us know if any other questions come up and we’d be happy to help.

    Cheers and have a great day!
    Geoff

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Require image or provide help text at that field.’ is closed to new replies.