Support

Home Forums Event Espresso Premium EE_ANSWER Shortcode

EE_ANSWER Shortcode

Posted: May 1, 2013 at 10:36 pm


John Leigh

May 1, 2013 at 10:36 pm

The EE_ANSWER shortcode doesn’t seem to work for questions that are not marked as required.
It’s a single site, all plugins and wordpress are up to date.
PHP Version : 5.4.13 / 64Bit OS


Josh

  • Support Staff

May 2, 2013 at 10:49 am

Hi John,

Is this for the email ee_answer shortcode, the one for the ticket template, or the attendee list?
Can you post the exact shortcode that you’re using so we can investigate?


John Leigh

May 3, 2013 at 1:34 am

in this particular case i have “company” and “website” as 2 custom questions, first one being required.

$company = do_shortcode(‘[EE_ANSWER q=”13″ a=”‘.$id.'”]’);

$website = do_shortcode(‘[EE_ANSWER q=”14″ a=”‘.$id.'”]’);

The company pulls out just fine, but instead of the website i get the info stored in the question that has the  id 15 witch is also required.

So i’m guessing the routine just ignores the unrequited questions.


Josh

  • Support Staff

May 3, 2013 at 8:44 am

I ran a quick test to see if would skip over required questions and it displayed the non required questions.

I thought it might have something to do with content of the website question’s answer, which I imagined could throw things off under specific conditions. So I ran another test and entered a website URL into a non-required text field and it still worked.

To be honest I’m a bit stumped on this one. I checked through the ee_answer shortcode’s code in shortcodes.php and I don’t see any checks for a required flag.

Can you check in the database (they’re in the events_answer table) to see if the answers are actually getting recorded there, and if so, if they look like the answers that were entered?

The support post ‘EE_ANSWER Shortcode’ 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