Sorry can't think of a neater title. If I now understand it correctly: if you have a 'yamlform' field reference on an entity to a form, you don't need to check the 'allow every entity to be the source entity box', because it should check to see if there is a referring field on the source entity.

However, it checks for the field by name 'yamlform', and not for a field of type 'yamlform', so any field added with the name field_xyz doesn't count.

Code is probably clearer, so patch to explain, follows in a second.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ekes created an issue. See original summary.

ekes’s picture

jrockowitz’s picture

Status: Active » Needs review
FileSize
2.08 KB
2.32 KB

Code makes sense but I made a few tweaks...

  • Changed protected to private
  • Renamed function and variables to be more specific
  • Removed negatives within if statement

Lets see if my patch passes

  • jrockowitz committed d3e01f1 on 8.x-1.x authored by ekes
    Issue #2795307 by jrockowitz, ekes: Yamlform field referencing source...
jrockowitz’s picture

Status: Needs review » Fixed

Please checkout 8.x-1.x or download the latest dev release to test.

Status: Fixed » Closed (fixed)

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