Steps to replicate the issue (include links if applicable):
When adding values to combobox field, saving the form, then edits the form again, the value replaced with 0
Here's minimal wikitext to check this
<noinclude> This form is being used to create my_page pages for use as Main pages in our system {{#forminput:form={{PAGENAME}}|button text=Create my page|placeholder=Page name}} </noinclude> <includeonly> <div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div> ==Page== {{{for template|my_page}}} {{{field|parts 1|holds template}}} {{{end template}}} {{{for template|part 1|multiple|add button text=Add part|embed in field=my_page[parts 1]|display=table}}} {{{field|title_section|input type=combobox|label=part title (can be the target page name)|values from namespace=Main}}} {{{field|subtitle|label=part content}}} {{{end template}}} __NOTOC__ __NOEDITSECTION__
- create form with this wikitext
- create page with this form, add value to one or more section_title fields.
- Save it.
- Check in ?action=edit - value is OK
- Edit the page with the form.
- You dont have to change something
- Save it
- Check in ?action=edit
- section_title=0
What happens?:
value is becoming 0
What should have happened instead?:
value presists
Software version :
- MW 1.40.3
- PageForms commit: be96c99fe44dcaa2d4764ee3a8eaca47d443a339
Other information
The data I've mange to grab:
- this is PHP bug: the source code of HTML rendering input with value="0"
- while editing the page with the form (second time) $cur_value of the problematic field, for example in PFFormPrinter::formHTML is an array of [0 => 'FIELD_VALUE']. I don't have enough knowledge if this as intended or not.
- If I'm understanding well, this is part of $gridValues var