BF disable form after a Date and Time

  • Gilles361
  • Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Posts: 160
  • Thank you received: 4

Gilles361 created the topic: BF disable form after a Date and Time

Hi,
I would like to disable my Form once it reaches a date and Time.
After a Date & Time : "April 20, 2019 08:30 PM (04/20/2019)", users can't add a new record.
Can I specify time in "European format"?
How to display a "CLOSE Form message"?
Thank, Gil
#235449
  • Posts: 2109
  • Karma: 72
  • Thank you received: 267

mihaela replied the topic: BF disable form after a Date and Time

Hello,

To disable your form once it reaches date and time, go to your form's properties > Advanced Tab > More Options, then click on the PIECES tab. In the BEFORE FORM section, click on the "Custom" radio button and in the code area below add the following code:
$now = new DateTime();
$date = new DateTime('2019-04-05 08:30:00');

if( $now > $date)
{
     // replace index.php with the url to an article explaining that the max. amount has been reached
    
     header("Location: index.php");
     exit;

}

As explained in the code, you have to replace index.php with the URL of an article where you explain that the submission date has passed.

Where exactly you would like to specify time in "European format"?

Regards,

Mihaela
#235456
Moderators: ForumSupporttomeperica
Time to create page: 0.053 seconds

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99€

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here