Ajouter un commentaire

Really nice, many thanks for sharing!

I needed in the form also a checkbox to accept the subscription. I share my workaround, it may help to someone else ;-)

1- Create the checkbox in the web form form
2- Add another condition to the rule that verifies if the checkbox has been set on. I´m not sure it if is this the best approach, it works for me...
I check if the checkbox array has something on it to also avoid an offset warning if the checkbox wasn´t been set.

<?php
if (count($data['components']['THE_CHECKBOX']['value']) > 0) {
      return
true;
      } else {
      return
false;
}
?>

Regards, Gabriel