I need to create 10 or so pages that are linked in a specific order but can only be accessible when the user enters the correct access code.

The first page would be open and "unlocked" - but the user will need to enter some details before being able to see the next page, they would be presented with the access code for the 2nd page and this would be added to their user profile as their current access code level.

To see the next page, the user would require to enter a specific code to unlock that page.

How would I go about getting this to work? From what I know, webforms would be useful for "linking the pages in order" but I haven't found a way where you must enter a "password" access the next page of the form.

The idea is that the 10 pages would act as 10 different levels for a simple learning "game."

  • could this be made instead as a multi-part/page form that only provides the submit button when everything is correct or filled in? eg, do whatever and then when everything is filled in, the submit takes you/redirects you to the next page?
    – Jimajamma
    Mar 4 '13 at 19:41
  • So do you mean to have 1 multi-part/page form (with 10 parts for the 10 levels), then once completed - you would submit and advance to another area / be shown the "complete, game result" page screen?
    – dan2k3k4
    Mar 5 '13 at 8:28
  • well with ahah/ajax, you can do all sorts of stuff in a form, eg, when one field is filled out, another presents itself, etc. on a multipart one, your users could fill out all the fields on the current page, and when they are validated/correct, they can press whatever to get to the next page.
    – Jimajamma
    Mar 5 '13 at 19:33

My first reaction would be to create 10 roles (Level 0 to 9) and to restrict access to the pages using Content Access to control access to the pages by role. Then use Rules to assign roles based on the tasks you set out in the learning game.

  • I thought about this option too but I think creating roles might not be ideal as the levels could continue to grow past 10. However it does seem the simplest option so I will try it out like that for a prototype.
    – dan2k3k4
    Mar 4 '13 at 15:34

Another way that I was thinking about was to create a webform for each page. Then when the user submits - they would be redirected to the "next stage" node which would be hidden and only viewable when they've completed the webform for the next stage.

Thus: 10 webforms, 9 next stage nodes (or 9 variants to a page panel that use contextual links). Complete first webform -> get redirected to next stage for "2nd webform" which would show the access code and URL for 2nd webform (which could be via contextual link too containing the access code).

Rules (and/or Trigger?) would be used to grant/disallow access using Content Access or similar modules - unsure if that would work in this case or if I can only grant based on specific role rather than just grant specific user access to node (or at least grant them the option to view if they provide the access code since anonymous users would be able to "play").


You could use workflow for this.

This module allows you to create arbitrary Workflows, and assign them to Entities.

Workflows are made up of workflow states. Transitions between states can be allowed per role. For example, a workflow with the states Draft, Review, and Published could be assigned to the Story node type. Only users with role 'chief editor' can set Stories to the published state. You can set up the Workflow to alter states from form, page, comment and a special workflow tab.

Transitions between workflow states can have actions assigned to them. In our example, we could assign an action so that when the story moves from the Draft state to the Review state an email is sent out. Another action could be assigned to the transition from Review to Published so that the node's status is set to Published (and becomes visible on your website).

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.