2

I have a site that uses the webforms module to gather user information. On the front page there is a list of previous submissions. Each of which has a link to view the submission (generated by Views module)

Link is like thingie.com/node/115/submission/1763

However, some users are saving the form as draft and coming back at a later date. When they get to the view page they aren't noticing they can click on the edit tab and are filling in a second submission. So we're getting 'weird' duplicates and they're wasting time.

As the submission view node is loading I'd like to check if it is a webform; which is in draft; and they are the submitting user. If so I'd like to redirect them to

thingie.com/node/115/submission/1763/edit

I think know how to do the redirect and the test but I'm being slow and am not sure what hook to catch.

I'm about to investigate the node load hook but wondered if there was a better way.

2 Answers 2

0

Ah ha... and I just learnt about row and field level templating in Views... isn't views incredible?!

I followed the instructions here http://drupal.org/node/352970 and can alter the link and it's text based on the context of each row.

Super!

0

You should take a look at hook_init, it's the best option to make a redirect. But it's not the best option.

You should try to have 1 views with a attachment.

I de user save the webform the main view should show it. If it's a draw the attachment view should show it. And in the main views show a text like "Please finish your lead" or something similar.

Oskar

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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