Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

How to typeUserAttrs on checkbox-group options #986

Closed
sxndy1 opened this issue Aug 20, 2019 · 5 comments
Closed

How to typeUserAttrs on checkbox-group options #986

sxndy1 opened this issue Aug 20, 2019 · 5 comments

Comments

@sxndy1
Copy link

sxndy1 commented Aug 20, 2019

Description: Default by adding a checkbox-group is one option with the label "Option 1" and the value "option-1".

I want to have a custom option like "Hello" and "World". How to setup the typeUserAttrs?

I tried something like that, but I think the syntax is wrong because I don't see an options-attribute anymore with that:

           typeUserAttrs: {
                "checkbox-group": {
                    options: {
                        values: [{ label: "Hello", value: "World" }]
                    }
                }
            }

Environment Details:

  • formBuilder Version: 3.2.3
  • Browser: all
  • OS: Win10

Screenshot - (optional)

image

@nlhkabu
Copy link

nlhkabu commented Jun 10, 2020

@sxndy1 did you ever work out how to do this?

@MarcusDelvecchio
Copy link

@sxndy1 Ever figure it out?

@sxndy1
Copy link
Author

sxndy1 commented Jun 16, 2020

Nope, I've never got an answer and couldn't solve it. Sorry guys!

@kashif-ali-khan
Copy link

@kevinchappell ,
Any update on this ?
or Any workaround, how can we achieve this ?

kevinchappell added a commit that referenced this issue Aug 24, 2020
kevinchappell added a commit that referenced this issue Aug 24, 2020
github-actions bot pushed a commit that referenced this issue Aug 24, 2020
# [3.6.0](v3.5.2...v3.6.0) (2020-08-24)

### Features

* custom option attributes ([c072cae](c072cae)), closes [#1038](#1038) [#986](#986) [#956](#956)
@kevinchappell
Copy link
Owner

its possible to do this now with onAddOption callback. return the attributes you want to appear on the option. https://formbuilder.online/docs/formBuilder/options/onAddOption/

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants