Skip to content

add an null value as an option in a select #95

Answered by lovasoa
flosigime asked this question in Q&A
Discussion options

You must be logged in to vote

About NULL getting transformed to the empty string (''): standard web forms can only send string values back to the server, and SQLPage is fully transparent, it doesn't try to decode form values to non-string types.
You can easily convert the empty string to a NULL in your sql statement that handles the form results with NULLIF($your_field, '')

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by lovasoa
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants