Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
hi and thanks for this module!
how can i setup your module to use a select instead of button?
something like this:
<select name="permissions">
<option>public</option>
<option>hidden</option>
<option>buddies</option>
...
...
</select>
Comments
Comment #1
markus_petrux CreditAttribution: markus_petrux commentedThe privacy status icons are implemented client-side. It is the whole code in
js/privacy_status_dialog.js
. If you want a select element, you need to replace the whole thing.The icon is added dynamically with this code:
You have to replace this (and all the code that is related to this icon) with a select element, and bind an onchange event that updates the privacy status for each field like this:
These are hidden form elements that hold the privacy status of all fields, and they are sent and updated when the form is submitted.
Comment #2
markus_petrux CreditAttribution: markus_petrux commentedComment #3
erik.ahlswede CreditAttribution: erik.ahlswede commentedIs there a way to redefine this without hacking into the existing JS?