Closed (duplicate)
Project:
Webform
Version:
6.x-2.7
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Sep 2009 at 05:09 UTC
Updated:
21 Dec 2009 at 09:25 UTC
Jump to comment: Most recent file
Comments
Comment #1
donkasok commentedComment #2
vm commentedComment #3
donkasok commentedHi,
Is there any way that i can accomplish this.
with regards,
Don Asok
Comment #4
Sree commenteddid you tried the pathauto with token modules?
Can you detail the issue in more detailed way.
Comment #5
donkasok commentedHi,
i am using webform module to create a free signup form.
So authenticated and anonymous user can signup for the event.
Once a user signed up, an email will sent to user.
In that email there is an unregister link , once they click , they will be able to see their submission and a button to unregister.
If you look into the url of unregister you will be able to see url like http://localhost/eve/node/5/submission/5/unregister
if an anonymous user change it into 4 he will be able to access others submission.How can i hash the url .
Please see the attachments
with regards
Don Asok
Comment #6
donkasok commentedHi,
Is there any way that i can accomplish this.
with regards,
Don Asok
Comment #7
donkasok commentedLooking for help/ paid custumization
Comment #8
donkasok commentedsree any idea about this
Comment #9
donkasok commentedsree any idea about this
Comment #10
robertdouglass commentedYou need to have something concrete to link submissions to users. Email address would be a good one. Ask for the email address in the webform, and once a user has registered, allow them to delete all of the webform submissions that were submitted using the same email as on their user account. This will all take custom programming.
Comment #11
donkasok commentedThank You Robert,I will work on this suggestion.
Thanks a lot
With regards,
Don Asok
Comment #12
donkasok commentedHi Robert,
As i was looking for a solution , I created an access called unregister submission.So whenever user submitted a form (anonymous user too), a hashed value will store in database. The hashed value is md5 of the time and ip addres. Now i am trying to append the hash value to the url of unregister.The codes i created was given below.Please look into this and give me a suggestion .
Database Change
------------------------------
In schema webform_submissions add a varchar for hash value
'hash_value' => array(
'description' => 'The hash value for user submission.',
'type' => 'varchar',
'length' => 128,
),
Webform_submissions.inc
------------------------------------------
Insert hashed values into database
In function webform_submission_insert($node, $submitted)
$hash_value = md5(time().ip_address());
$result = db_query("INSERT INTO {webform_submissions} (nid, uid, submitted, remote_addr, hash_value) VALUES (%d, %d, %d, '%s')", $node->nid, $user->uid, time(), ip_address(), $hash_value);
Webform.module
---------------------------
In node submissions, add for unregister
$items['node/%webform_menu/submission/%webform_menu_submission/unregister/%hash_value'] = array(
'title' => 'Unregister',
'load arguments' => array(1),
'page callback' => 'drupal_get_form',
'page arguments' => array('webform_submission_unsregister_form', 1, 3,5),
'access callback' => 'webform_submission_access',
'access arguments' => array(1, 3,5, 'unregister'),
'weight' => 3,
'type' => MENU_LOCAL_TASK,
);
In function webform_submission_access
case 'unregister':
return user_access('unsregister own webform submissions');
In function webform_perm()
'unsregister own webform submissions',
In function webform_access($op, $node, $account)
case 'unregister':
return user_access('unsregister own webform submissions', $account);
Thank You
Comment #13
Ravi.J commentedHi,
Did you manage to find a concreate solution to the problem ? If yes can you share how you solved the issue..
Comment #14
quicksketchSee the patch in #584852: Allow anonymous form submissions to be viewed/edited.