The Gui Looks like (maybe I got an error with Naming for all fields)
Now I as @Teodor his Post with storing these Checkboxes as Arrays for his Meal Example. But I have a helptable in MySQL where I wanna insert these infos as separate MySQL rowinsert. So per Checkbox, one mysql insert.
But now my question: What makes more sense? I mean I need to add later also DELETE Actions and UPDATE Actions. Whats more robust and easier to handle?
If I go with separate DB Row Inserts, how to handle that? Any example?
Bonus Question: How to limit the Checkable forms to 5 ? SO If I would have 10 Checkboxes, only 5 of them are Checkable
Select ONE of the checkboxes which has the same name[] as the rest, add new validation rule and under collections select max items. Enter 5 or 10 or whatever value you need:
@Teodor how smooth your solution is implementable in any of these wappler projects! It amazes me everytime and I‘m sure that post helps alot of users and grow up documentation, adoption and community !
Will try that solution out and come back! That [Array] modification is what I thought about it to pass it to my Insert Repeat statement! Great and that „Max“ selectable checkbox solution, is even more simple as I thought… My god! I lost such alot of time with playing around with all these standalone coding frameworks out there…
@Teodor one question by side: When would you go for solution A or B?
A is like your post about Meal Menus separated via split/join for each single row.
B solution which I’ll take now : Maybe I have more flexibility later for doing stats, queries, reports and store each checkbox values into separate rows as written in my question.
… hopefully Update statement is similar I guess for solution B…
I prefer using a details table (like your solution B) related to the main table with a primary key.
The tutorial you mention just shows what most of the users here are doing - store everything in one table
@Teodor works like a charm! Amazing! UsedI the dmx bind for the values. Wooow so cool!
BTW: I got ISO Date like 31.12.2018 and Validation says Error… is it possible to change that check to ISO? Looks like my feld is DD.MM.YYYY but JS validation does US Date stuff… ?
Or maybe there is a trick to just change that js library to Europe standard. Cause its still “English” and Week starts not with “Monday” …
I am trying to store the multiple checkbox values that I receive as an arrya, in a single column as a comma-separated-value.
But the join does not seem to function without a column name. Any suggestions on how I can convert the array to a csv?
Join function on client side just needs a character parameter.
But, join function on server sides asks for a character and a column name.
Without column name, I get this error:
$_POST.OptionValue.join(',', '') OR $_POST.OptionValue.join(',', ' ')
Is there a way to convert my input OptionValue which has a value like ["4","5"] to a CSV like 4,5 so that I can store it in table column?