1

I am looking for a way to populate some fields in an (entity)form (for example name and email) once a client has filled in his tax-number (or another configurable field). The field to compare it to is in another node or entity.

For example:

A registration form for an event => when a user is registrating: check if the filled in tax number allready exists in one of the nodes 'attendees last year'. If it finds a match, it takes the date in the 'name' field of the node, and puts it in the 'name' field in the form (in the next step, see underneath)

For the forms I am using the EntityForms-module (which creates a form with the fields of an entity, so users can create new entity objects) and a custom module which allows me to go through the form in multiple steps, a rules event is triggered when the 'continue' button in a form-step is clicked.

I have rules and rules-forms-support enabled, I try to make a rule:

  • Event: my custom continue button is clicked
  • Condition: entered date from a (to be selected) field from the form allready exists in a (to be selected) node's field
  • action: the (to be selected) field from the node is put in the (to be selected) field on the form

I can't hardcode this because it has to be configurable (have to make multiple different forms..)

Stephan Muller
  • 27,018
  • 16
  • 85
  • 126
  • passing the form & form_state through the event now using the 'variables' attribute. Now I can use these in my condition and action.. still haven't found it like it should though.. – Karel-Jan Misseghers Apr 12 '12 at 14:20

1 Answers1

1

You may be able to do this via a value in the URL. Checkout Prepopulate module http://drupal.org/project/prepopulate

There is a dev version for Drupal 7.

You should be to add the extra info in the URL in the Rule.

tedbow
  • 151
  • 1
  • 3