Hello,
I have a question in community builder date fields,
How to set today's date , (and if possible adding 15 days to it)
see the attachment to understand better.
I need to store the acceptation date (what CBsubs doesnt, it does only for the registration date)
I think this is the easiest way to do it, I just need to grab the current date.
Jm
Attachments:
Last edit: 7 years 5 months ago by krileon. Reason: Added [SOLVED] tag to subject
There is no functionality for what you're trying to do in CBSubs Fields. CB Auto Actions can do this using its Format Functions, which will run your supplied values through PHP functions to accomplish what you're wanting. Your alternative is to use CBSubs SQL Actions and do that using SQL functions. Example as follows.
Code:
UPDATE `#__comprofiler` SET `cb_acceptation` = DATE_ADD( NOW(), INTERVAL 15 DAY ) WHERE `id` = '[user_id]'
See MYSQL documentation below for further usage information.
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.
Thank you sooooo much,
I did not even need to change a letter of your script
And I am glad to see an exemple of sql request from there,
have a nice week end!