• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: value of datefield when no date is chosen

value of datefield when no date is chosen 13 years 11 months ago #10557

  • tigi
  • tigi's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
Hi,

I want to store the contents of the submitted form into com_content.
For publish up and stop publishing I use the calendar popup.
As long as a value is selected for a date everything works fine (start publishing is required), but when no "stop publishing" date is selected I can't figure out how to check this.

I'm using
if(isset($_POST['form']['stop_publishing'])){
	$date = explode('-',$_POST['form']['stop_publishing']);
	if ($date[2] == '0000') {
		$publish_down=date('Y-m-d H:i:s',strtotime("2080-01-01 00:00:00"));
	}
		else
		{
		$publish_down=date('Y-m-d H:i:s',strtotime("$date[2]-$date[1]-$date[0]"));
	}
}

For $date[2] == '0000' I've used '1970', 1970 and '' but it doesn't help.
I want to check on no date selected. The else on isset doesn't work either.

Anyone any ideas on this?
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!