EntityForm

Drupal 7 Modal Core Forms and Modal Entity Forms using ctools modal

Some days ago we had the requirement to display some entityforms and other Drupal Core forms like the login in modal windows.

The second requirement is easy to solve. Many modules like colorbox.module, lightbox.module and others solve this already.

Drupal 7: Check if user has permission to submit (access) entityform in code

Sometimes you may want to check if a user has permission to access an EntityForm. Perhaps to find out, if you can display a block, link or special advice.

This is not quite as sinple, because  drupal_valid_path() always returns true for the EntityForm URLs, which is not good but... OK, we have to deal with it.

So what's the right way?

Use "entityform_access()"!

  1.