0

I have this snippet in one of my nodes folder:

node--experience.php

At the moment, the section has a download button which holds a URL:

// Download Info pack (PDF).
if ($entry_info) {

  //var_dump($entry_info);

  print l('Download info pack', render($entry_info), array('attributes' => array('class' => array('btn', 'btn-border'), 'target' => '_blank'))); 
}
else {

  //print '<a title="'. $title .'" class="btn btn-solid info-pack-notify">Download info pack</a>';
} 

So, I need to open a webform once I click in the "Download info pack" button, and after form submission, the page should redirect to me to the link that is currently being held by $entry_info variable.

How can I do that?

I tried to add jQuery in the PHP file but for some reason, nothing works either than console.log or alert expressions.

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.