Hi,
I am trying to embed the user contact form under the node full view.
I have tried with the code field, using this code:
print drupal_get_form('contact-personal-form');
or
print drupal_get_form('contact_personal_form');
=> got these error messages in both cases:
Notice : Undefined index: contact_personal_form dans drupal_retrieve_form()...
Warning : call_user_func_array() expects parameter 1 to be a valid callback, function 'contact_personal_form' not found or invalid function name dans drupal_retrieve_form() ...
Then I tried using the dynamic field, adding content from widget > contact form.
=> nothing is displayed.
Is it possible at all to display the user contact form via display suite?
(PS: great module, great tutorial videos!)
Comments
Comment #1
swentel commentedWell, the contact form is in contact.pages.inc, so you need to make sure you include that file, that's why PHP is complaining about the valid callback problem.
I have no idea why the custom content wouldn't work, but that's rather a ctools problem that something else, but if you'd include that extra file for the custom field, it should work.
Comment #2
Louis Bob commentedThanks a lot for your reply.
I have tried that:
The only thing displayed now is "Array".
No big deal anyway, I have given up this solution, but thanks again :)
Comment #3
ytsurkthis should work (i'm using it in a slightly different way ..)
better to use the module_load_include function ..
plus you missed the rendering of the form-array,
plus the form key uses underlines instead of dashes .... *argh*
Comment #4
sjdmackay@netscape.net commentedhello ytsurk,
thanks for this code.
how can I add node author name into code to complete recipient field on form?
v grateful for any help as contributed modules that should do this (eg Contact Links, Contact Form on node) don't appear to work with DS enabled displays....
Comment #5
bossmac commentedhope this will help