• 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: How to include a PHP class during form process?

How to include a PHP class during form process? 12 years 3 months ago #20982

  • bness
  • bness's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
I made a signature element for RSForm so users can use a stylus and add a signature.

The JavaScript takes the signature and encodes it in JSON and puts it in a hidden field that saves with the form. It works great.

However, I want to convert the JSON data to base64 image data. Their is a PHP library for such things, but I don't know the best way to include it in the area for "Script called on form process"

Usually in Joomla, if you need to include an external PHP file, you use:
require_once JPATH_ROOT.'path/to/file.php';

This isn't working on "Script called on form process" I suspect it's because JPATH_ROOT isn't defined in this process. So I was wondering what the equivalent would be.
The administrator has disabled public write access.

How to include a PHP class during form process? 12 years 3 months ago #20992

  • octavian
  • octavian's Avatar
  • NOW ONLINE
  • RSJoomla! Official Staff
  • Posts: 783
  • Thank you received: 110
Hello,

Actually, JPATH_ROOT is defined at the very beginning Joomla! runs - so it's defined in RSForm! Pro as well (RSForm! Pro is running on top of the Joomla! framework).

PS: JPATH_ROOT doesn't contain the slash at the end so the path would be JPATH_ROOT.'/path/to/file.php'
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.
The following user(s) said Thank You: bness

How to include a PHP class during form process? 12 years 3 months ago #21004

  • bness
  • bness's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
Gah. Brain fart. I was so frustrated yesterday. All I forgot was that slash. Thank you. All is well now.
The administrator has disabled public write access.

How to include a PHP class during form process? 11 years 10 months ago #23931

Hi,
Can anyone help me with integrating jquery signature pad plugin with RSForms.

--
Many Thanks
The administrator has disabled public write access.

How to include a PHP class during form process? 11 years 9 months ago #24398

Hi,

I also need help with integrating jquery signature pad plugin with RSForms pro.

thanks in advance
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!