1

I have the Entityform module installed on a Drupal 7 portal and I've created a new entityform type (let's call it "Preview").

When I land on the list of "Preview" submissions, each submission View link points to [host]/[drupal_base]/entityform/[entityform_id]

What I'd like to get is to change "entityform" term in that url path with something like "preview" term, so that I'll have [host]/[drupal_base]/preview/[entityform_id]

I tried to define a URL alias from the admin configuration panel, but from what I've understood, I can't define an alias with a dynamic [entityform_id] (maybe using a kind of placeholder). Am I wrong about this?

I'm not so skilled in Drupal, so I wonder if there's a way to achieve that result?

1

Note: This answer only applies specifically for the input form (I misunderstood the question above)

I was able to accomplish this by using simply modifying the entityform made configuration.

  • Go to /admin/structure/entityform_types
  • Click on the edit link for the entity form you wish to change
  • Scroll to the bottom and in the URL path settings set the specific custom paths that you wish
  • Save

It's that easy and it works for both the preview and the actual form :)

| improve this answer | |
  • Thanks for your answer, but that path works for accessing the "form page". I'd like to override the submission View link – Valerio Marcellino Jul 27 '15 at 8:58
  • Ahhh shoot sorry I understand now! Your right the only thing that I can suggest is to you log a bug since that has not been added to the functionality sorry for misunderstanding – shaneonabike Jul 28 '15 at 12:19
  • hey no problem mate, thanks a lot for your effort ;) – Valerio Marcellino Jul 28 '15 at 13:28
1

You can dynamically create URL aliases for Entityform Type submissions by using the contributed Pathauto and Pathauto Entity modules.

Here's how:

  1. Download, install and enable the Pathauto and Pathauto Entity modules (if they aren't already)

  2. Within Pathauto, enable the Entityform Submission entity type at:

    Administration > Configuration > Search and Metadata > URL Aliases > Entities admin/config/search/path/entities

    Pathauto Entity

  3. Create a new default Pathauto pattern for Entityform Submissions using the following replacement patterns:

    [entityform:type:label]/[entityform:entityform-id]

    The [entityform:type:label] token is the key ingredient and corresponds to the Entityform Type's name or label (e.g. "Preview") and will be lowercased and hyphenated in the alias (e.g. /preview/1234).

    Pathauto Entityform Submission Pattern

  4. Save the Pathauto configuration

Once this is complete, all new Entityform Type submissions will no longer use the default path registered by the Entityform module (i.e. /entityform/1234) and instead use the new alias pattern we defined (i.e. /preview/1234).

You can use the "Bulk Update" feature in Pathauto to add/update/delete any pre-existing Entityform Submissions aliases.

| improve this answer | |
0

Pathauto_entity

You can select the entities to be enabled in Home » Administration » Configuration » Search and metadata » URL aliases » Entities tab, and they will appear in Home » Administration » Configuration » Search and metadata » Patterns, where you can define the desired aliases for them.

Make sure to define those patterns before trying to create new URL aliases (including bulk update), as otherwise they won't be created.

If the Entities tab does not appear, it means that the site has no custom entities defined, apart from the standard content types, taxonomies, comments and users.

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.