Bonfire icon indicating copy to clipboard operation
Bonfire copied to clipboard

Module builder generate code with syntax error

Open ghost opened this issue 10 years ago • 1 comments

i tried to use module builder generate a module base on a existed table. One of the columns is "ENUM('TEXT','NEWS','MUSIC')" . Module builer generate edit.php with this code segment :

$options = array(
TEXT => TEXT,
NEWS =>NEWS,
MUSIC => MUSIC,
);

Certainly, it cause a error. The picture shows how i fill the form.

bug

ghost avatar Mar 06 '14 03:03 ghost

There should be a note on the form that says something like:

If DB field type is "enum" or "set", please enter the values using this format: 'a','b','c'...
If you ever need to put a backslash ("\") or a single quote ("'") amongst those values, precede it with a backslash (for example '\\xyz' or 'a\'b').

Since this is an issue I intended to look at, though, I will leave this issue open, for now, as a reminder.

mwhitneysdsu avatar Mar 06 '14 14:03 mwhitneysdsu