field type checkbox and sql-table

field type checkbox and sql-table

MadMax76MadMax76 Posts: 149Questions: 33Answers: 1

Hi,

I am using this field in my editor:

                { label: "Berechtigungen", name: "FREIG_users.groups", type: "checkbox", options: [
                        { label: "Geschäftsführer", value: "gf" },
                        { label: "Adminstrator", value: "admin" }
                        { label: "some", value: "so" }
                        { label: "other", value: "oth" }
                        { label: "examples", value: "ex" }
                    ] },

Now an array is sent to the sql-server, but he would like texts ("gf", "oth" or "gf, admin, ex") and I get an error there. Due to the way data is used later, I would like to stay with a text-field.

Any chance to accomplish that?

Thanks
Max

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    Answer ✓

    Hi Max,

    Just to confirm, you want a single string submitted rather than an array of strings? If so, use the separator option of the checkbox input type. You could set it to be a comma or whatever else you need to indicate the multiple values.

    Regards,
    Allan

  • MadMax76MadMax76 Posts: 149Questions: 33Answers: 1

    thanks solved!

Sign In or Register to comment.