S
S
solalex2015-11-05 14:50:59
1C-Bitrix
solalex, 2015-11-05 14:50:59

How to make a form output in Bitrix only on certain days?

It is necessary to display the form on the page only from the 1st to the 5th day of each month. How to implement it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
solelex, 2015-11-16
@solalex

I will answer myself

<?
$today = getdate();

if ($today[mday]<6) {

$APPLICATION->IncludeComponent(
  "bitrix:main.feedback",
  "form",
  Array(
    "COMPONENT_TEMPLATE" => "form",
    "USE_CAPTCHA" => "Y",
    "OK_TEXT" => "Спасибо, ваше запрос принят.",
    "EMAIL_TO" => "[email protected]",
    "REQUIRED_FIELDS" => array(0=>"NAME",),
    "EVENT_MESSAGE_ID" => array(0=>"21",)
  )
);
}

?>

K
kompi, 2015-11-05
@kompi

Use native php tools to work with the date and enable/disable the component by condition.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question