Hi!

I found problem:
when we use module entityreference_prepopulate and set action on entityreferece field (with entityreference_view_widget) to disable field - we can't save node form with error: 'field is required'

Comments

dr.admin’s picture

We can't save node because in function entityreference_view_widget_validate disabled fields is not in $input array

dr.admin’s picture

StatusFileSize
new1.04 KB
dr.admin’s picture

StatusFileSize
new1.06 KB
jsacksick’s picture

I'm wondering why would you use entityreference_view_widget if you disable the field and prepopulate it via entityreference_prepopulate? Why do you need the widget for then?

jsacksick’s picture

Status: Active » Fixed

I tested and committed the attached path, thanks for your contribution even though I still don't understand in which situation you would need to use ERVW with entityreference_prepopulate.

  • jsacksick committed ebed7f0 on 7.x-2.x
    Issue #2306389 by dr.admin, jsacksick: Fix integration with...
dr.admin’s picture

:))
On my site i have node "doctor" and it has entity reference field for node "clinic".

When user create doctor from node "clinic" i use entityreference_prepopulate to fill entity_reference field, but if user create node "doctor" from other pages user selects clinic via ERVW.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.