|Anonymous | Login||2014-09-23 18:23 CEST|
|Main | My View | View Issues | Change Log | Roadmap | Repositories|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|04751||User patches||Other||public||2010-11-19 19:04||2012-06-21 14:14|
|Target Version||Fixed in Version||2.00|
|Summary||04751: Adding attribute fields in the register form of a survey|
|Description||Arouse the need in the registration form of a survey, that the custom attributes could be filled up in the form (only appear names and e-mail), currently this can be achieved loggin in and add manually the "participant" with the custom attributes.|
So, i found in the common.php and register.php (common_functions.php and register.php in the limesurvey_dev repository) some commented code that meets my needs, and realized that it code was taking the approach, as the "static way".
I write some code, and now works like a charm, regardless of the number of attributes that exist.
See .diff's attached.
|Additional Information||About the implementation, in the common_functions.php i use the function GetTokenFieldsAndNames to get the custom attributes as hash map, and for each key (name of the field) its generate a html input tag concatenating the word "register_" with the key.|
In the register.php we calculate the extra number of custom attributes with the name of the field, and dinamically appends to the insert sql statement.
It's a fast solution, but we call two times the function GetTokenFieldsAndNames.
|Tags||No tags attached.|
|LimeSurvey build number OR git commit ID||9459|
|Attached Files||patch_crystalblood.patch [^] (4,100 bytes) 2010-11-19 19:04 [Show Content]|
Carsten, this is an often requested feature by our users. Can you please have a look?!
|What do yo think about te code attached? you consider that may help? it works for me.. 8-)|
edited on: 2010-11-23 19:44
In general it looks okay, but the patch assumes that by default all attribute fields are visible in the register page. There should be a way to configure what fields are visible in the rgister page (would be best in the attribute field configuration). Could you do that?
Please note that we feature-freeze for 1.91 soon so we would need your updated patch within the next 5 days.
edited on: 2010-11-25 15:31
It will be a honor to help, to accomplish this task i propose to add another field in the tokens_xxxx table, with the syntax simmilar to the attributes fields, something like this:
So it's a way to show the fields in the registration form (register.php) and in the tokens management (tokens.php), we display with a checbox if shows or not.
Now i find myself with little time (finals in college), i don't think that 5 days will be sufficient, but if you want i'll do it! sooner or later.. hehe
Now i'm free, and i have time if you wish i'll acomplish this issue!
Another proposal may could be adding to the existing extra attribute field another token after the value, something like this:
what do you think?
I think that sounds great. Make sure your patch will be based on
https://limesurvey.svn.sourceforge.net/svnroot/limesurvey/source/limesurvey_dev [^] and it should be created with SVN diff.
Also make sure it is backward compatible (defaults to 'no') after the installation was upgraded.
|CrystalBlood, any news on this? It would be really great to have this feature at one of the next Limesurvey versions.|
Sorry c_schmitz and Mazi!
I'm in college exams!
My activities on this issue were frozen for a moment.
No problem if you wait a little longer? or you are in a great hurry?
|Thanks for getting back in touch with us. We prefer a tested, working solution so there is no problem if it takes a little longer. We are very happy that you are working on this!|
|2010-11-19 19:04||CrystalBlood||New Issue|
|2010-11-19 19:04||CrystalBlood||File Added: patch_crystalblood.patch|
|2010-11-23 16:02||Mazi||Note Added: 13588|
|2010-11-23 16:02||Mazi||Assigned To||=> c_schmitz|
|2010-11-23 16:02||Mazi||Status||new => assigned|
|2010-11-23 17:44||CrystalBlood||Note Added: 13592|
|2010-11-23 19:22||c_schmitz||Note Added: 13597|
|2010-11-23 19:44||c_schmitz||Note Edited: 13597||View Revisions|
|2010-11-23 22:08||c_schmitz||Status||assigned => feedback|
|2010-11-24 21:38||CrystalBlood||Note Added: 13602|
|2010-11-24 21:38||CrystalBlood||Status||feedback => assigned|
|2010-11-25 15:31||CrystalBlood||Note Edited: 13602||View Revisions|
|2010-12-20 00:51||CrystalBlood||Note Added: 13815|
|2010-12-20 16:28||c_schmitz||Note Added: 13816|
|2011-03-17 23:16||Mazi||Note Added: 14459|
|2011-03-28 02:28||c_schmitz||Note Added: 14581|
|2011-03-28 02:28||c_schmitz||Status||assigned => feedback|
|2011-03-28 13:31||CrystalBlood||Note Added: 14586|
|2011-03-28 13:31||CrystalBlood||Status||feedback => assigned|
|2011-03-28 15:34||Mazi||Note Added: 14588|
|2012-06-21 14:14||c_schmitz||Status||assigned => closed|
|2012-06-21 14:14||c_schmitz||Resolution||open => fixed|
|2012-06-21 14:14||c_schmitz||Fixed in Version||=> 2.00|
|Copyright © 2000 - 2014 MantisBT Team|