-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Short description of the issue
Documentation for the Options field states that one should be able to define custom IDs:
While we recommend letting the Options Fieldtype assign unique ID numbers for you, you may optionally assign your own. To do this, specify 123=title when adding a new option, where 123 is the ID number you wish to assign and title is the title text for your option.
When I try to do this, it doesn't seem to work. If I append an option with the exact values mentioned in the docs (123=title), 123 gets automatically replaced by whatever is the next available ID (i.e. if I have options with IDs 1, 2, and 3, this new option always gets ID 4.)
Expected behavior
According to the documentation I should be able to define custom IDs for individual options.
Actual behavior
Manually defined option IDs get overridden by automatic (incremental) defaults when field settings are saved.
Note: I was hoping to use an automatically populated Options as a replacement for Page References in a case where a page has to reference itself. As a workaround for circular references I tried to create an options field, the options of which would be automatically managed. That worked beautifully, except that I wasn't able to set custom IDs (they would've been the same as Page IDs) and this plan fell apart. Note that setting the value alone didn't help in this case due to convenience and performance issues :)
- ProcessWire version: 3.0.98
- (Optional) PHP version: 5.5.9