Support

Home Forums Event Espresso Premium Questions, question groups and javascript

Questions, question groups and javascript

Posted: March 19, 2013 at 6:10 am


Patrik Johnsson

March 19, 2013 at 6:10 am

Hi,

To tick the boxes:
WP 3.5.1
EE 3.1.30 7P
EE Recurring events 1.1.7
Multi-event 1.0.4
new install
not online publicly

Regarding questions groups:

I have groups A and B, and questions q1, q2, q3, q4. The setup is such:
A: q1, q2
B: q1, q2, q3, q4

It will be displayed as
A: q1, q2
B: q3, q4 (because q1 and q2 has been included in A).

However, if I have three groups asking for essentially the same type of information, the second and third groups will not be displayed, only if I make separate questions in seperate groups. (case: Company secretary is booking for employee, and is paid by accounts office, so booking details, invoice details and delegate 1 all hold the same TYPE of information, but with different content. I can’t have three “First names”, as they either don’t show up, or get’s horribly confusing on the backend, see below).

Problem with that is, that questions only have one field: “Question” to identify. So I will either end up with three identical questions that I will need to second-guess which group to put them in, or whether I’ve already put that in a group, or I end up with different names on the front-end, which is also something I do not want.

Regarding the form itself:

The form has an id of “registration_form”, which means I can’t put multiple forms on the same page, as it will break the javascript. (would come in handy if it’s a recurring event, and I have different dates as tabs, and upon clicking them, the form for that event would be displayed). While I can override the individual form rendering with the Custom Files plugin, I can’t change the javascript as it’s core, so in the event of an update, all changes are lost. I could copy the javascript into a custom file, and work from there though, although I might run into an incompatibility with the core javascripts, so this is problematic.

What I would like:
– replace the Question field with id and label fields. Label gets displayed on front-end, id gets used on the backend.
– replace the hardcoded #registration_form from the form with a class and rearrange javascript to work with it

I know it’s a fairly big undertaking. I’m quite happy making the changes and submitting a pull request, however since EE is a premium plugin, any core modifications I’d submit would also be premium.

Can you get back to me with the following info:
– is this something you’d do in your time, and if so, what’s the ETA on that
– is it something I need to find a workaround for (getting back to my client and telling them they can’t have it as is, however, this and this and that might work)
– are you happy to reimburse us for time spent on the code modification and pull request?

Thanks


Josh

  • Support Staff

March 19, 2013 at 7:54 am

Hi Patrick,

At this time there are no plans to add this to the core plugin.

Here is one suggestion: You could disable the core JavaScript from loading and use your own. WordPress has a built in enqueue so that scripts can be removed and replaced without touching core files. For example, if you wanted to replace the JavaScript file that handles the additional attendee form, you could add this to your custom functions file:

// Removes additional attendee JS
add_action( 'wp_print_scripts', 'my_deregister_ee_attendee_js', 100 );

function my_deregister_ee_attendee_js() {
    wp_deregister_script( 'espresso_add_reg_attendees' );
}

Then you could replace it with your own JavaScript to add classes and make your other customizations.


Garth

  • Support Staff

March 19, 2013 at 3:38 pm

Hi Patrick,

Thanks for your post.

We’re actively building on Event Espresso 4 (formerly 3.2) and feel we should dedicate our resources to that version so this is not something we can handle right now. If you want to consider building this for 3.2, and do a good job at it then we might be interested… Does that make sense

The support post ‘Questions, question groups and javascript’ 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.

Event Espresso