Closed Bug 518935 Opened 15 years ago Closed 15 years ago

Allow empty option in select boxes for AAQ form

Categories

(support.mozilla.org :: Forum, task)

task
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: cww, Assigned: jsocol)

Details

(Whiteboard: sumo_only)

Attachments

(1 file)

Right now, we can't have a <empty> default option in the new ask a question form.
Should this also involve warning if the empty option is still chosen?
Assignee: nobody → james
Target Milestone: --- → 1.4.1
Whiteboard: aaq
OS: Linux → All
Hardware: x86 → All
Target Milestone: 1.4.1 → 1.4.2
Attached patch PHP patch, v1Splinter Review
This patch allows you to put "<empty>" into the "options" box and generate an empty option. Place it first for the empty option to be the default.

Caveats: You can only have one empty line--from the description in comment 0, I think this is OK. This patch doesn't add validation from the JavaScript side. If that's necessary, it shouldn't be too difficult, but we'll need a way to describe which fields were left blank.
Attachment #405942 - Flags: review?(paulc)
Comment on attachment 405942 [details] [diff] [review]
PHP patch, v1

WFM. Will we need some SQL run to drop a key, on stage/prod?
Attachment #405942 - Flags: review?(paulc) → review+
(In reply to comment #3)
> Will we need some SQL run to drop a key, on stage/prod?

I can't see why, this just allows a new value to be encoded in the serialized array stored in tiki_question_fields.options.
r53431
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Cheng, mind giving this a whirl on staging?
Wasn't this landed in 1.4.1?
Target Milestone: 1.4.2 → 1.4.1
(In reply to comment #7)
> Wasn't this landed in 1.4.1?
Nevermind. It's trunk only :)
Target Milestone: 1.4.1 → 1.4.2
Functionality works, it'd be nice to have instructions on the admin page though so it's clearer how this works.
Status: RESOLVED → VERIFIED
Should we get this to prod now?
r54585 (prod)
Whiteboard: aaq → sumo_only
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: