Required field status for custom fields

Hi there,

When grabbing a list details through the API using get_custom_fields(), it seems it is not possible to know if the custom fields of this list are required or not.

Is there a way to know if a custom field has its "required" property set to on or off with the API?


ChrisB ChrisB, 3 years ago

Hi TS,

Yes, the required details are returned when you pull the custom fields for a list. You'll see something like this:

I hope that helps!

TS, 3 years ago

Hi Chris, I have the same type of object returned as you, however, I can't see what is the property that specifically spots if a field is required or not.

For example, I have created a custom field marked as required in the list admin, yet this is what is returned:
[FieldName] => CF Text
[Key] => [CFText]
[DataType] => Text
[FieldOptions] => Array()
[VisibleInPreferenceCenter] => 1

Am I missing something here?

TS, 3 years ago

Anyone one from support?

200,000 companies around the world can't be wrong.

From Australia to Zimbabwe, and everywhere in between, companies count on 
Campaign Monitor for email campaigns that drive real business results.

Get started for free