I would like to create a draft entityform for every entityform type after a user registers, I've been trying to attempt to create a list of entityforms in rules but can't work out how.

This is needed so that a list of entityforms can be displayed to the user with the percentage complete next to the entityform using views. The problem is that if the user hasn't attempted any then the list is empty rather than just displaying the entityform type and then 0% complete.

In rules I've tried to create a component that returns a list of entityform types so that I can loop over the list create a form and then save it but I just can't find a way to get the entity types into a list. This can be done manually with a rule for each but that would mean that each time I add a new entityform I would have to create a new rule.

  • Would it be possible just to do db_select on entityform_type-table?
    – user20301
    Sep 4, 2014 at 13:02
  • How can you do that in rules? is there a PHP action? I would like to avoid that if possible. Sep 4, 2014 at 13:22
  • I wouldnt do it with rules, but if you must then this is what i would try gist.github.com/snowstorm0182/…
    – user20301
    Sep 4, 2014 at 14:25
  • Why not use rules? I can create the custom rule action I was just trying to solve it without one. Sep 4, 2014 at 14:27
  • 1
    You could just change your Views show on Entityform types and then make a relationship to the submissions but don't make it a required relationship. You would have to filter the relationship by uid of submitter.
    – tedbow
    Sep 10, 2014 at 4:37


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.