Forums

Signature Pad

fiorrr 24 Jul, 2014
Hi!

I'm trying to get Signature Pad in one of my forms. I'm following the guide located here:
http://www.chronoengine.com/faqs/3308-how-can-i-get-my- form-signed.html

I copied the code from the guide where it's supposed to be, but all I will get when testing the form is:

Fatal error: Call to undefined method JDocumentHTML::_() in /administrator/components/com_chronoforms5/chronoforms/actions/html/html.php on line 209

What can I do?

Thanks!

Andreas
GreyHead 25 Jul, 2014
Answer
1 Likes
Hi Andreas,

Hmmm . . . as far as I can see this is because I used $doc in the FAQ and Max has used $doc in CFv5 to do something different. I suggest that you edit the FAQ code to replace $doc with say $docu so that the two are different:
$docu= & JFactory::getDocument();
$url = JURI::root().'/components/com_chronoforms/extras/signature_pad/';
$docu->addScript($url.'jquery-1.8.3.min.js');
. . .

Bob
fiorrr 25 Jul, 2014
So far - so good... 😀

After replacing all $doc in the code from the FAQ with $docu I'm getting the following error:

Fatal error: Call to a member function addScriptDeclaration() on a non-object in /administrator/components/com_chronoforms5/chronoforms/actions/custom_code/custom_code.php(20) : eval()'d code on line 13

Could that be because of special characters used in the FAQ code (field names containing an underscore)?
fiorrr 25 Jul, 2014
Changing the field names didn't fix it... But missed one $doc, so after replacing that also it is:

Fatal error: Call to a member function addScriptDeclaration() on a non-object in /administrator/components/com_chronoforms5/chronoforms/actions/custom_code/custom_code.php(20) : eval()'d code on line 26
fiorrr 25 Jul, 2014
1 Likes
Never mind, I messed up the code!😀
After copying it again and replacing it it's now working fine!

Thanks!!!
This topic is locked and no more replies can be posted.