Skip to content

Instantly share code, notes, and snippets.

@renepardon
Created March 7, 2012 23:12
Show Gist options
  • Save renepardon/1997071 to your computer and use it in GitHub Desktop.
Save renepardon/1997071 to your computer and use it in GitHub Desktop.
<?php
public function isValid($values)
{
if (array_key_exists('already_customer', $values)
&& $values['already_customer'] == 'on') {
$this->getElement('billingfirstname')->setRequired(false);
$this->getElement('billinglastname')->setRequired(false);
// ...
}
}
return parent::isValid($values);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment