Adding Express Attribute Checkbox From an Install Package That is Checked by Default

Hey all. I know there is a place at the end for settings but I can’t figure out the syntax.
$attendee->addAttribute(‘boolean’, ‘Active’, ‘attendee_active’, what-the-heck-goes-here);
Can anyone shed some light on this?
Thanks in advance.

Hi @Chrouglas - I think you’re looking for an Attribute Key Settings Object:

Which should be defined here:

Let me know if that does the trick.

That did it. Thanks.

I also found help here… GitHub - shahroq/whale_c5_cheat_sheet: concrete5 Cheat Sheet but pieced it together with what you sent since the boolean settings weren’t mentioned.

For those who, like me, code-by-google, here is the final code.

$settings = new \Concrete\Core\Entity\Attribute\Key\Settings\BooleanSettings();
$attendee->addAttribute('boolean', 'Active', 'attendee_active', $settings);

Thanks again.