$a = array(&$form['row11']['req']['field_jrf_requesting_manager_sd'], &$form['row11']['rel']['field_jrf_releasing_manager_sd']);

adding only this line to hook_form_alter() will make on submit

  • A 'Start date' date is required if an 'end date' is supplied for field Requesting sign date #1.
  • A 'Start date' date is required if an 'end date' is supplied for field Releasing sign date #1.

assuming that field_jrf_requesting_manager_sd and field_jrf_releasing_manager_sd are of type date

Any ideas ? :)

Comments

Mykola Dolynskyi created an issue.

Mykola Dolynskyi’s picture

unset($a)

after all operations makes all OK
but curious what is happening if elements are in array by link ?