Skip to Content Skip to Menu

Substitutions date

  • ericmuc
  • ericmuc
  • OFFLINE
  • Posts: 390
  • Thanks: 30
  • Karma: 2
  • Add-ons
4 years 2 weeks ago #320854 by ericmuc
Substitutions date was created by ericmuc
Hi,

I need in the "Custom Display Rows" - output of a groupfield something like:

[cb:if cb_edu_time_until > strtotime( 'now' )] xxxx [/cb:if]

Can I use substitutions something like this way or do you have a hint how to handle a content in "Custom Display Rows", so that content is shown only if cb_edu_time_until is greater than today?

Thanks, best regards
Eric

Please Log in or Create an account to join the conversation.

  • ericmuc
  • ericmuc
  • OFFLINE
  • Posts: 390
  • Thanks: 30
  • Karma: 2
  • Add-ons
4 years 2 weeks ago #320857 by ericmuc
Replied by ericmuc on topic Substitutions date
Hi,

In the meantime I have added in the code field an "if xxx with return 'false'" and can add with this a "if substitution" in "Custom Display Rows" - output, so it works and I have the desired result.

Thanks, best regards
Eric

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48434
  • Thanks: 8274
  • Karma: 1443
4 years 2 weeks ago #320862 by krileon
Replied by krileon on topic Substitutions date
It's not possible to perform PHP in substitutions. If you need the current date you can use the below substitution.

[cb:date format="Y-m-d" /]

Aside from that you can add a Code field provided by CB Code Field to the field group and substitute it in as needed.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: ericmuc

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum