How to dinamically set a widget attribute in PHP
Summary:
I need to set the max_year attribute from the DateInput widget dynamically
Content (required):
I am trying to do something like this:
<?php $max = date("Y", strtotime("2 years")); ?>
<rn:widget path="input/DateInput" name="Incident.CustomFields.Patient.Patient_DOB" max_year=<?= $max; ?> label_input="Patients Date of Birth (mm/dd/yyyy):" required="true" />
No errors are displayed, but the rendered HTML ignores the attribute as is
Version (include the version you are using, if applicable):
Code Snippet (add any code snippets that support your topic, if applicable):
<?php $max = date("Y", strtotime("2 years")); ?>
<rn:widget path="input/DateInput" name="Incident.CustomFields.Patient.Patient_DOB" max_year=<?= $max; ?> label_input="Patients Date of Birth (mm/dd/yyyy):" required="true" />