Support

Home Forums Event Espresso Premium Prefill Fields in add_new_event form – Admin

Prefill Fields in add_new_event form – Admin

Posted: August 5, 2012 at 1:57 pm


Matt Barrett

August 5, 2012 at 1:57 pm

Hi Everyone,

I’m new to event espresso – just purchased a business license for a clients website I’m working on and so far everything looks great. Seems like a real quality product.

My question – is there a way for me to prefill the event creation form for my customer? There are certain things (like event end time and registration dates for example) that will almost always be the same. I would like to pre-fill these fields for my customer.

The reason being that my customer is a bar that will be posting gigs – there will be a few different people posting these gigs and most of them are lazy and/or aren’t too computer savy. I want to make it easy for everyone involved.

This is the list of stuff I want prefilled:

  1. Registration Times – to be filled with 8am and 12pm
  2. Event End Time – to be filled with 11:59pm
  3. Attendee Limit – to be filled with 200

I am also interested in possibly filling the registration date as well but this would involve some javascript to fill the registration end date as the event start date and the registration start date as “today’s date”.

Any ideas or tips to implement any or all of these features?

Thanks!
Matt


Josh

  • Support Staff

August 6, 2012 at 11:03 am

Hi Matt,

Note that if you try creating a new event and leave the time/date fields blank, it will automatically add dates and times (as well as an unlimited limit).

In Event Espresso 3.1, you could try to change these values in /includes/event-management/insert_event.php.

Look at lines 98; 155 & 156; 171 & 183;

Note that at this time, this isn’t a pluggable function and there are not hooks/filters there, so on each update these would need to be re-updated.

In Event Espresso 3.2, there is a filter that you’ll be able to use by creating a new function like this in the theme’s functions.php:

function my_change_default_attendee_limit($event){
    $event->reg_limit = 200;
    return $event;
}
add_filter( 'filter_hook_espresso_new_event_template', 'my_change_default_attendee_limit, 10, 1 );


Matt Barrett

August 6, 2012 at 10:42 pm

Excellent! Thanks for the quick reply and this is all good news. I have to say, I’m very impressed with your product, your support and this website. I especially like the user account page. Keep up the good work and I’ll be a customer for a long time.

The support post ‘Prefill Fields in add_new_event form – Admin’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Do NOT follow this link or you will be banned from the site!
[i]
[i]