Good Day,

Is there a way to remove the To: field display? I am trying to prevent users from seeing a list of users and also to prevent private messages being sent to the wrong recepient.

also, is there a way to add a link (you must be logged in /register to reply to this message) for anonymous users?

Thank you,

Mark

Comments

mrgoltra’s picture

Is it possible just to comment out this part from the code, to remove the drop down contact list? Is this a good way?

// array_unshift($contacts, t('Contacts'));
//$form['quick'] = array(
//'#type' => 'select',
// '#options' => $contacts,
// '#attributes' => array('style' => 'display: none;'), // hidden unless JS is working
// '#suffix' => '

'
// );

TIA,

Mark

billmurphy’s picture

subscribing ;)

doublejosh’s picture

Did you need to create a hidden field instead of a text field?

Who did that look?

Thanks.

mrgoltra’s picture

I eventually left it alone. It was behaving differently. There are time where the message will not be sent if you are replying to a post.

doublejosh’s picture

Correct me if I'm crazy, but just turning the "To:" input (more technically: name="recipient" id="edit-recipient") from type="text" to type="hidden" in the .module file would leave it in the form but make it not shown. You could also insert a disabled="disabled" (to stay XHTML compliant) so they could remember who their contacting but not be able to change it.

I don't feel crazy.

berdir’s picture

Status: Active » Closed (fixed)

I apologize for pinging the participants, I'm closing out old issues.
If you have more questions, feel free to re-open the issue or fill a new one.