I have a multistep webform that I would like to display a video only on page one.

I am trying to find a reliable variable that will only be available on the first page.

I have tried this in hook_form_alter but it is unreliable when the user navigates back to a previous page. It works initially. Page one video shows, page two no video, back to page one no video, page two video shows.

I am using drupal_add_js to add a display:none on the video div when page_number > 1, but it isn't working as I expected. Any ideas?


I hacked it and used jquery to hide the div when there is an existence of a previous page class.

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.