Default to "Edit Separately" for Padding in Custom Modules

Hi there,

Is there an option for the Spacing field to default to “Edit Separately” for padding? This is the initial padding interface:

I would prefer it to default to this:

Secondly, is it possible to disable left and right padding? I hazarded a guess in fields.json, but it throws an error in the CLI:

{
 "label": "Spacing",
 "name": "spacing",
 "type": "spacing",
 "visibility": {
 "hidden_subfields": {
 "margin": true,
 "padding": {
 "left": true
 "right": true
 }
 }
 }
}

Thanks!

If you set a default for any of the padding values (even if the value is just null) it’ll default to the Edit Seperately state.

You can’t completely hide select values in padding or margin but using limits you can set their min and max to 0 to disable them (note: limits requires you to include a “units” value).

{
 "name": "spacing",
 "label": "Spacng",
 "required": false,
 "locked": false,
 "type": "spacing",
 "inline_help_text": "",
 "help_text": "",
 "visibility": {
 "hidden_subfields": {
 "margin": true
 }
 },
 "limits": {
 "padding": {
 "left": {"max": 0, "min": 0, "units": ["px"]},
 "right": {"max": 0, "min": 0, "units": ["px"]}
 }
 },
 "default": {
 "padding": {
 "top": {
 "value": 0,
 "units": "px"
 },
 "right": {
 "value": 0,
 "units": "px"
 },
 "bottom": {
 "value": 0,
 "units": "px"
 },
 "right": {
 "value": 0,
 "units": "px"
 }
 }
 }
}

Perfect - works well enough for my uses. Thank you!