Support

Home Forums Event Espresso Premium Member already registered

Member already registered

Posted: September 6, 2013 at 4:44 am

Viewing 6 reply threads


Klaus M

September 6, 2013 at 4:44 am

The code on https://eventespresso.com/topic/how-to-display-member-is-already-registered-to-event/ works like a charm! Thanks for that. Now i’d like to have a little IF/ELSE thing but do not know where to edit that?!

So if the member has not registered

<p class=”event_form_submit” id=”event_form_submit-<?php echo $event_id; ?>”>
<input class=”btn_event_form_submit ui-button ui-button-big ui-priority-primary ui-state-default ui-state-hover ui-state-focus ui-corner-all” id=”event_form_field-<?php echo $event_id; ?>” type=”submit” name=”Submit” value=”<?php _e(‘Submit’, ‘event_espresso’); ?>”>
</p>

ELSE

echo ‘<p style=”background-color:red; color:#fff; font-size:20px; text-align:center;”>Hey you already booked this!</p>’;

Any idea?

Thanks!


Dean

September 6, 2013 at 6:06 am

Hi,

In btween the curly braces on this line

<pre class=”brush: php; gutter: true; first-line: 1; highlight: []; html-script: false”>if($event_list_id == NULL) {} else {

you will need to wrap your code in php tags though

e.g.

<pre class=”brush: php; gutter: true; first-line: 1; highlight: []; html-script: false”>if($event_list_id == NULL) {
?>
your code
<?php
} else {


Klaus M

September 7, 2013 at 5:13 am

hm, all is see is nothing?! what have i done wrong?


//var_dump($event_list_id);

if($event_list_id == NULL) {

echo ‘<p>SUBMIT BUTTON HERE</p>’;

} else {
foreach ($event_list_id as $id) {
if ($id == $event_id) {
echo ‘<p style=”background-color:red; color:#fff; font-size:20px; text-align:center;”>Hey you already booked this!</p>’;
break;
}
}
}

?>

<p class=”event_form_submit” id=”event_form_submit-<?php echo $event_id; ?>”>
<input class=”btn_event_form_submit ui-button ui-button-big ui-priority-primary ui-state-default ui-state-hover ui-state-focus ui-corner-all” id=”event_form_field-<?php echo $event_id; ?>” type=”submit” name=”Submit” value=”<?php _e(‘Submit’, ‘event_espresso’); ?>”>
</p>

<?php } ?>

</form>
</div>


Klaus M

September 10, 2013 at 5:46 am

Any news on this?


Josh

  • Support Staff

September 10, 2013 at 2:19 pm

Hi Klaus,

If you require the services of a PHP developer to work with you to make your needed customizations as specified, we can advise contacting one of our recommended developers:

https://eventespresso.com/developers/event-espresso-pros/


Sidney Harrell

September 10, 2013 at 2:21 pm

I would do it slightly differently, with a flag:
https://gist.github.com/sidharrell/5c94fa7a50ccfb9d93c8


Klaus M

September 11, 2013 at 3:29 am

Excellent! Exactly what i was looking for. Thank you so much, Sidney!

VERY RESOLVED 🙂

Viewing 6 reply threads

The support post ‘Member already registered’ 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