How To Create A Prefilled Field with the username?

Home Forums Calendar Products Community Events How To Create A Prefilled Field with the username?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #973633
    stephenschildbach
    Participant

    This is a two part question: 1. How do you pre-fill a field with a meta value in the Community events plugin? 2. And, how do you echo the username meta value in that field?

    I am using The Events Calendar Pro for a Membership site. The members are the only people who can enter events and I’m using the Community Events for front end event submissions. Both my client and the members want a pre-filled field that has their member group name as a part of the event listing. This will sometimes be different from the “Organizer”, so it really has to be a different field and needs to be automatically inserted. Also, for retrieval of this field, I’m wondering if it is possible to echo, with PHP, the username of the member groups (which is the member group name, even with spacing for each word within the member group name. Essentially, member group name = username.

    #973878
    Geoff
    Member

    Hi stephenschildbach–nice to see you again and hope all is well. 🙂

    Good question! Honestly, I think it would take a fair amount of custom development to pull this off but I see where you’re going with it and like the idea. You might even want to try integrating Advanced Custom Fields as a means of adding fields to the form–I believe they also have a way to echo data as defaults with a little noodling (or another example).

    Sorry I don’t have more of a concrete solution for you here, but will this at least help you get started?

    Cheers!
    Geoff

     

    #974244
    stephenschildbach
    Participant

    I was thinking way to hard about this Geoff, and you might have thought I wanted a little extra which made the question appear to be more complicated than it was: It is not so much that I need a field pre-filled as much as I needed to display the event author on each event. That turns out to only need

    <p><strong>Member Group:</strong> <?php the_author(); ?></p>

    …to do so. Case closed. I hope this helps someone else.

    #974409
    Geoff
    Member

    Nice! That is excellent and I’m stoked it was a lot easier than we were both making it out to be. Thanks for confirming. 🙂

    Geoff

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘How To Create A Prefilled Field with the username?’ is closed to new replies.