Answer the question
In order to leave comments, you need to log in
Drupal web forms Leads?
Hello everyone!
I need Drupal experts who know web forms well.
There is a task to set up and connect 4 different sites on different CMS to the bitrix-24 portal through Leads so that all form notifications arrive in the portal 3 sites are ready CMS were Wordpress and Modx, but Drupal does not come out.
I need to find the .php file on Drupal, the form handler that sends these messages to EMAIl, it can also be the ajax.php file.
This file should contain form field names and form method="post".
Here is the lead script itself that needs to be put inside the .php file
file_get_contents(" https://test.ru/lead2bit24/lead.add.php ".
"&PHONE=".urlencode($_POST['submitted[phone]']).
"&COMMENTS=".
"?client_id=4c7c19329fe4a6dfb58b172c24c7433a".
"&NAME=".urlencode($_POST['
"&SOURCE_ID=3"
);
It looks something like this prntscr.com/aoqidc
Answer the question
In order to leave comments, you need to log in
Hacking some file in the kernel or contribut is a bad idea. What you need in Drupal is easy to do. In your module, you need to define hook_form_FORM_ID_alter in which you specify how and where to send
$form['#action'] = 'http://text.ru/lead....';
$form['#method'] = 'GET';
$form['#pre_render'][] = 'MODULENAME_external_pre_render';
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question