Jump to content

[Solved] Use checkbox array in block settings


Recommended Posts

hi there,

block setting is a fantatstic feature!

i'd like to use it to assign severeal additional classes and therefore use several checkboxes in a row.
output should be something like:

margins: [ ] top    [ ] bottom     [ ] left    a.s.o

i tried something like this ( but that doesn't work):

    $settings->add([
      'name' => 'margin-checkbox',
      'label' => 'Marging',
      'value' => $field->input('margin-checkbox', 'checkbox', [
        '*foo' => 'foo value',
        'bar' => 'bar value',
        'baz' => 'baz value',
      ]),
    ]);

is there a way to do that?

  • Like 1
Link to comment
Share on other sites

Hey @herr rilke thx for your question!

There has always been the 'checkboxes' (plural) input type for this. In my IDE I can just click on the "->input(...)" and it will take me directly to the file RockFieldsField.php and there (inside the input method) you'll see all available options.

I've added the option "checkboxes-inline" and changed the wording for radios to "radios" and "radios-inline" accordingly 🙂 

Please check v5.5.1

kUkiiy9.png

Link to comment
Share on other sites

  • herr rilke changed the title to [Solved] Use checkbox array in block settings

[Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved]

[Solved]

thank you

🤪

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...