Passing PHP code on submit

mrmcbobit

New Member
Hello all, I have a form setup to take tenant applications for a rental property and I need to pass some information on to the payment provider when the end user hits submit.


I see there is a plugin for PHP and I have the option to use a file or add in the code. The data I'm attempting to send is attached, but I'm not sure I'm doing it correctly. Do I add this plugin on the LIST or do I add it to the FORM?

Anyone have any suggestion on the best way to do this, is there some support info that I've over looked?

Thanks,
Bob
 

Attachments

  • test2.php.txt
    1.1 KB · Views: 137
If you need to run some code when you submit a form, you have to upload your php script in the plugins>fabrik_form>php>scripts folder.
Then in your form settings, in the "submissions plugins" tab, you add a php plugin and chose your script in the dropdown (don't forget to set the other settings too).

The list php plugins are used when you want to perform some action on records already in the database and displayed in a list view. Those go in the plugins>fabrik_list>php>scripts folder.
 
Note that Bob has posted more information here, in Help Wanted:

http://fabrikar.com/forums/showthread.php?t=25855

So any specific assistance should probably go on that thread.

I think what he'll need is a form plugin that builds a redirect. Can't use the redirect plugin, as it needs to calculate a hash to include in the args to the remote processor.

The other thing I'd be concerned about is that the example code on that other thread shows the submission to the payment processor as being of method=post, and it uses a nasty onLoad hack to automatically redirect with a form submission.

I'd like to know if that can be replaced with a GET, i.e. a simple redirect with the args being on the query string rather than in the fake posted form content.

-- hugh
 
I'd like to know if that can be replaced with a GET, i.e. a simple redirect with the args being on the query string rather than in the fake posted form content.

I was told no, that basically the php file has to be submitted along with the Hidden fields at the bottom of the example form.

So am I just up the creek on this one?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top