Forum Academy Marketplace Showcase Pricing Features

Deals app - I want to only show deals available today

Hi Guys, My app displays a list of promotional deals nearby for the user (retail promotions - i.e. sports store 10% off deal). Some deals will only be available particular days of the week. If a deal is not valid today, I don’t want it to show up in the list. For example a deal that is valid Mon - Friday. If it was saturday, i dont want this to show up on the list.

Does anyone know the easiest way to configure this?

Add a field of type=date range to your Deal data type. Then anywhere you display Deals constrain your Search (or set a visibility condition) by value of this field.

Alternatively, you could add a yes/no field (e.g. “Active?”) and use it in combination with the date range field to show Deals where Active?=yes.

Lots of ways to do this, others may have better suggestions.

Hey @daniel3 thanks for your help. What you said makes sense, however I am still very new to Bubble. Would you be able to give more specifics? I’m just unsure how the app would know what day of the week it is to know whether or not to show a deal? Thanks, Alex

Hi @dickson.alex10
Sure. You can use the “Current Date/Time” option to build conditions around today’s date/time. Here’s an example:


Click the Edit icon on a deal and play with changing the Days of Week and Start/End dates, and/or create new deals.
Here’s a link to the Editor page so you can check it out behind the scenes:

Tried to include a bunch of common use cases like conditional formatting that changes text and background color when a deal is not valid (for example, if today is Wednesday and the deal is only valid on Mondays and Fridays).

Mess around and feel free to ping with any questions.

Thanks so much @daniel3. This looks like it would be very helpful. What I will try and do is when a deal isnt valid today that instead of showing a red message I will make it disappear from the list. Hopefully this is not too hard to figure out. I can see the front end but the link you provided to the bubble editor seems to just take me back to bubble homepage. Would you still have the link somewhere to the editor? Thanks again, Alex

For the editor link, just go to bubble.is and append /page?name=index&id=deals-playpen&tab=tabs-1. I’ve added a Today’s Deals link to demo how you would make any deal not valid today disappear.

Thanks @daniel3. To create the 'Valid Days of Week input, did you use a dropdown input form? I have created one but it literally operates as a dropdown where you can only choose one day. Yours looks to be set up so you can choose multiple days and they go in the box as tags. Yours also has all these options for ‘tag font colour’ but mine doesnt. Am i missing something?

I’m using a different element, the MultiDropdown Input. You can install this from your Plugins tab in the editor.

This topic was automatically closed after 70 days. New replies are no longer allowed.