Closed (outdated)
Project:
Prepopulate
Version:
6.x-2.1
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
29 Sep 2010 at 08:15 UTC
Updated:
14 Oct 2016 at 04:33 UTC
Jump to comment: Most recent
Comments
Comment #1
daniel wentsch commentedJust what I was wondering, too.
Subscribing.
Comment #2
MacaroniDuck commentedSame here. Subscribing.
Comment #3
idflood commentedI think the issue is out of the scope of this module but here is how this could be solved. First create a module which implement hook_form_alter. In this hook you can add a property "#disabled" to a form element to make it uneditable but still visible.
As a side note, this should not be used as some kind of security check. The url is really too vulnerable for this.
hook_form_alter: http://api.drupal.org/api/drupal/modules--system--system.api.php/functio...
forms_api_ref: http://api.drupal.org/api/drupal/developer--topics--forms_api_reference....
Comment #4
BeaPower commentedIs there an easier way for newbies?
Comment #5
Anonymous (not verified) commentedAlternatively, one could also use hook_form_alter like this:
'#attributes' => array('readonly' => 'readonly')which makes the text selectable but not editable which in turn might be safe but a little confusing for users.
Comment #6
jbrauer commentedThis is somewhat related to #252053: Allow admins to hide prepopulated fields which anticipated not displaying the now "locked" field. Would your use case call for displaying the field without allowing the value to be changed on submission?
Comment #7
El Bandito commentedHi
Ideally it would be possible to choose between prefilling and displaying as normal and editable, display the field but as read-only, or totally hide it. You knew the answer was going to be the worst case scenario, yes ?
Thanks for a great module.
El B
Comment #8
Norberto Ostallo commentedI have written a patch that solves this and other problems, you are welcome to test it and provide your feedback if you can. It applies to 7.x-2.x branch.
You can find it attached to this issue:
#1489526: Improve prepopulate behavior
Comment #9
fehin commentedI'm using this module with entity reference on user names. I would like to lock the field as I don't want users to change the referenced usernames.
Comment #10
nksahu commentedI wanted to hide title when it is prepopulated
I modified the prepopulate module like this
to
It works for me :)
Comment #11
jbrauer commentedClosing D6 issues as it's no longer supported.