0

In my RSVP page I want to be able to bring up a message to guests showing the name along with a message saying "You have been invited to ......".

I have added a field in my database rsvpEvent and double checked the naming is correct.

If someone could look at this page http://amy-and-duncan-are-getting-married.co.uk/rsvp/.

First name : craig
Last name : test
Password : rsvp

Here is the line of code I have added

if($attendee != null) {
    // hey we found something, we should move on and print out any associated users and let them rsvp
    $output = "<div>\r\n";
    if(strtolower($attendee->rsvpStatus) == "noresponse") {
        $output .= RSVP_START_PARA."Hi ".htmlspecialchars(stripslashes($attendee->firstName." ".$attendee->lastName)).RSVP_END_PARA;

        $output .= RSVP_START_PARA."You have been invited to ".($attendee->rsvpEvent).RSVP_END_PARA;

        /*if(trim(get_option(OPTION_WELCOME_TEXT)) != "") {
            $output .= RSVP_START_PARA.trim(get_option(OPTION_WELCOME_TEXT)).RSVP_END_PARA;
        } else {
            $output .= RSVP_START_PARA.__("There are a few more questions we need to ask you if you could please fill them out below to finish up the RSVP process.", 'rsvp-plugin').RSVP_END_PARA;
        }*/

        $output .= rsvp_frontend_main_form($attendee->id);
    } else {
        $output .= rsvp_frontend_prompt_to_edit($attendee);
    }
    return rsvp_handle_output($text, $output."</div>\r\n");
}

Line 7 is the new line of code that has been added, can someone tell me where I am going wrong?

Craig
  • 15
  • 7
  • is the problem that it is not printing out the rsvp event? – Pwner Oct 04 '13 at 14:40
  • Yes, I've tried numerous syntax changes and most either crash the website or just bring up the text "you have been invited to" and that is it – Craig Oct 04 '13 at 14:48
  • after the first $output, put var_dump($attendee->rsvpEvent); to see what it contains, also I don't think it should be wrapped in () – Pwner Oct 04 '13 at 15:10
  • Just brings up NULL at top of the form – Craig Oct 04 '13 at 15:24
  • well there is your problem $attendee->rsvpEvent has no value (a null value). I take it the value is assigned somewhere else (not in your code above) so the problem lays there, go back in you code to where the value is assigned, the code above works fine but as I said $attendee->rsvpEvent has no value to output. – Pwner Oct 04 '13 at 15:30
  • I was missing the rsvpEvent from the select statement above it, that's worked thanks for your help – Craig Oct 07 '13 at 10:55

0 Answers0