Problem/Motivation
At the moment a rvp field cannot be saved without a value in the entity reference. A constraint of the underlying entity reference field type is triggered and the for submission breaks.
Proposed resolution
At settings for the required property of the form elements for the reference and the value.
Remaining tasks
- Configuration form for "requried" settings
- Implementation of "required" settings
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | Selection_1897.png | 42.21 KB | isaacrc |
Comments
Comment #2
sgp913 commentedThis is still an issue as of May 2017.
Could we either validate the form before submission to check that there is a reference value present or:
Would it be possible to treat the empty entity reference field as NULL if there is additional text present?
There seems to be some related work on this here: https://www.drupal.org/node/2834024
For my current case, I am using a custom formatter to override the label of the entity reference with the text, but in the case that there is no entity, I would still like to be able to input text here.
Comment #3
isaacrc commentedComment #4
isaacrc commentedComment #6
isaacrc commentedAdded validation when the EE is empty but the text field has a value. Fixed in this commit: https://git.drupalcode.org/project/reference_value_pair/-/commit/59c159b...
Comment #8
isaacrc commented