![]() ![]() So add a Rules Condition "Entity has field" (prior to being able to use it anywhere later on in your rule), which refers to your field collection field.įor way more details about this, refer to " How to iterate over all field collection items in the Rules module?" (which also includes a rule in export format you may want to experiment with, if you only adapt some machine names of the used fields). The following examples add base and by bundle fields. In your case you try to do what is mentioned in step 3 above as a Rules Condition (instead of a Rules Action). Additional fields can be registered in hookentitybasefieldinfo() and hookentitybundlefieldinfo(). Field definitions Entity types define their base fields in a static method on the entity class. The field definitions are based on the Typed data API (see how entities implement it ). In my case, the end result is "node:field-enrollee:field-school-district:0:tid" Content entities have to define all their fields explicitly by providing definitions for the entity class. Using the "Data Selector" mode, you should be able to drill down through the entity in question to all the values contained within the field collection. For the "Field" value, select the machine name of the field collection in question.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |