• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: My custom form action script example

My custom form action script example 14 years 6 months ago #8973

Here is an example i use to change the custom action for a form
$formLayout = str_replace('post','GET',$formLayout);
 
$formLayout = str_replace('form[','',$formLayout);
$formLayout = str_replace(']','',$formLayout);
 
$formLayout = str_replace('method','target="_blank" method',$formLayout);
define("ACTIONSTRING", "action=\""); 
 
$newaction = "https://www.paypal.com/cgi-bin/webscr";
 
$leftportionend = strpos($formLayout, ACTIONSTRING);
 
if ($leftportionlen !== false) {
//If we've found 'action="'
 
  $leftportionend = $leftportionend + strlen(ACTIONSTRING);
 
  $rightportionstart = strpos($formLayout, "\"", $leftportionend); //Find the next "
 
  if ($rightportionstart !== false) {
  //If we've found the next "
 
    $formLayout = substr($formLayout, 0, $leftportionend) . $newaction . substr($formLayout, $rightportionstart);
 
 
  }
}
blah blah blah: link | email
The administrator has disabled public write access.

Re:My custom form action script example 14 years 5 months ago #8992

Forum is mangling this code so if it dont work please let me know or try rtf attachment

cheers

Attachment changeformaction.txt not found

Attachments:
blah blah blah: link | email
Last Edit: 14 years 5 months ago by alan.sparkes.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!