Programmatically checking checkboxes

Created on 9 October 2008, over 16 years ago
Updated 5 August 2024, 11 months ago

I've written a module that grabs data from an XML doc and creates a node out of it. In my node type I have checkboxes. I have made the relevant information appear in one of the xml fields as a comma-separated list, which i explode and then populate the checkboxes appropriately. This is where I'm stuck. I see the checkboxes take the form field_thisfield[keys][element], with value 'element' on the standard submit-node form. How do I deal with this programmatically? How can I check the appropriate boxes while creating the node through my module?

💬 Support request
Status

Fixed

Component
Node system 

Last updated about 20 hours ago

No maintainer
Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024