Custom php email form

Permalink
Good day - I have incluede a screen shot -
I need help with the following pleas?
I have created a external form – custom php email form with validation –
But I need to add the following to that form
CaptchaSecurityImages.php
monofont.ttf

I have added the required js file in the header

$this->addHeaderItem($html->javascript('livevalidation_standalone.js'));

How will I add the above two file, I have copied them into the helpers folder?

Please help the new bie
Thanks

1 Attachment

 
andrew replied on at Permalink Reply
andrew
For the first script, I would move CaptchaSecurityImage.php into the elements folder and load it via

Loader::element('CaptchaSecurityImage');

it should just include the file.

The font I would store somewhere else, perhaps in the libraries folder, and then just hard-coded a path to it where necessary:

$pathToFont = DIR_BASE_CORE . '/libraries/monofont.ttf';
vincent replied on at Permalink Reply
I have added the following in the header_required.php page - get error

$html = Loader::element('CaptchaSecurityImages');
$pathToFont = DIR_BASE_CORE . '/libraries/monofont.ttf';

Error
Warning: imagettfbbox() [function.imagettfbbox]: Invalid font filename in C:\wamp\www\oceanlife2_concrete\elements\CaptchaSecurityImages.php on line 60
Error in imagettfbbox function

I am not sure where to add the following
$pathToFont = DIR_BASE_CORE . '/libraries/monofont.ttf';

My code in the custom php that does validation and calls the images:
<td width="43" height="42"><img src="CaptchaSecurityImages.php?width=100&height=40&characters=5" /></td>

Please can you assit me - thanks