Hi,
I'm trying to modify the user's input before sending the data to an external server using the cURL plugin, but I don't understand how to do it. I have set-up the cURL plugin with addresses and such, but I don't succeed in modifying the value.
I have created a form with an input field 'number' and I would like to add international prefix to it before posting it to an external server.
User input: 0701234567
Modified value: 0046701234567
Where and how do I do this? Please, include example.
Thanks in advance
/Henrik
Ps. Thanks for Chronoforms, really excellent!
I'm trying to modify the user's input before sending the data to an external server using the cURL plugin, but I don't understand how to do it. I have set-up the cURL plugin with addresses and such, but I don't succeed in modifying the value.
I have created a form with an input field 'number' and I would like to add international prefix to it before posting it to an external server.
User input: 0701234567
Modified value: 0046701234567
Where and how do I do this? Please, include example.
Thanks in advance
/Henrik
Ps. Thanks for Chronoforms, really excellent!
Hi Henrik,
You can change it using PHP in the Plug-in Extra before cURL code box
Bob
You can change it using PHP in the Plug-in Extra before cURL code box
<?php
$number = JRequest::getString('input_name', '', 'post');
if ( $number ) {
$number = '004'.substring($number, 1);
}
JRequest::setVar('input_name', $number);
?>
Bob
Hi Bob,
Thanks for the valuable hint. Unfortunately, I do not understand where exactly I can find "Plug-in Extra before cURL code box"?
Do you mean "Extra Code" area on the "Form Code" tab by that?
Would be great if you could give a more precise explanation where to find that box.
Many thanks for your helpful support.
Oliver
Thanks for the valuable hint. Unfortunately, I do not understand where exactly I can find "Plug-in Extra before cURL code box"?
Do you mean "Extra Code" area on the "Form Code" tab by that?
Would be great if you could give a more precise explanation where to find that box.
Many thanks for your helpful support.
Oliver
This topic is locked and no more replies can be posted.