02/06/2019 at 12:31 pm
#483809
Keymaster
@ Craig
RE: so I thought of putting it in an IM set for unlisted
If the var_dump is on the frontend, unlisted will be filtered out of the results.
RE: Should I be using a custom field?
Yep.
RE: how do I access the textbox and checkboxes I added?
why, use the meta query of course (take this as a light hearted tongue in cheek state expression)
Here’s how you would query a custom text field value (I think, off the top of my head.).
$results = Connections_Directory()->retrieve->entries(
array(
'meta_query' => array(
'meta_key' => 'custom text field ID',
'meta_value' => 'code number',
),
)
);
The meta_key needs to exactly the field ID you used to register the custom text field.
The meta_value should be your school ID field.
A checkbox would be similar, but meta_value would be 1 for selected and 0 for not selected (if I remember correctly).
