ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

quick help with conditional statement

March 13, 2011 12:02pm

Subscribe [3]
  • #1 / Mar 13, 2011 12:02pm

    ren_aldo

    12 posts

    Hi Guys,

    I have a weblog field that is a select(dropdown) box comprising of the options: “Spaces Available” and “Sold Out”.

    I would like the following code to allow me to show an option to “buy now” when “Spaces Available” is selected from the dropdown list box in the weblog post….

    <h4>{if calendar_status == "Spaces Available"} <a href="http://{path=cart/add_event}">Buy Now</a>{if:else} {calendar_status} {/if}</h4>

    This code is not being picked up at all, and the calendar_status just displays whatevers been selected…

    what am I doing wrong?

    many thanks as always, you help is always most appreciated!

  • #2 / Mar 14, 2011 4:10am

    John Henry Donovan

    12339 posts

    ren_aldo,

    What version and build of EE are you using?
    Are you using a custom fieldtype or is this the native dropdown? When the calendar_Status is output does it match the string “Spaces Available” exactly

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases