Create a feedback form using buddypress messaging functionality
I am developing locally using MAMP, with wp 3.5, bp 1.6.4 with sitewide bbPress.
I want to use the buddypress messaging as feedback form (for logged in users only). I will create users called question, suggestion, feedback etc. which will receive these messages from users.
The form will contain a html select box dropdown (with options question, suggestion, feedback etc.) instead of recipient input from bp standard message form, rest being the same. Users will select the type of feedback from the select box, input the subject and content, and submit the message.
My problem is, how to ‘tell’ the standard buddypress message form to send the message to the selected recipient from the select box?
I did the following.
created a template, with form code copied from message.php (from bp-default > members > single > messages), changing recipient input to html select with options (suggestion, feedback etc.), keeping the id, class etc. of the previous input box itself.
created a blank page and applied the template.
The template renders fine, but the message is not sent, nor are errors rendered (eg. if I leave both subject and content empty).
Also, the page redirects to the logged in user’s inbox, and I need to change this to a custom redirect. Please advise how to do this, as well.
Also let me know if I should remove any redundant code.
Edit: php code removed as it got stripped out! Sorry.
Edit2: I thought of testing the form without any change (verbatim compose.php code with default text box for recipient name) but that doesn’t work either. It seems, it needs to be wrapped around the by buddypress code, but I can’t pinpoint which function must I include so the default text-box works.
You must be logged in to reply to this topic.