Is there any way to use custom captcha in phtml file directly without using layout in captcha in magento 1.9
If Anyone have any idea please help me. Actually i am thinking to add this below code in phtml file
<li id="captcha-input-box-contacts">
<label for="captcha_contacts" class="required"><em>*</em>Please type the letters below</label>
<div class="input-box captcha">
<input name="captcha[contacts]" type="text" class="input-text required-entry validation-failed" id="captcha_contacts">
</div>
</li>
<li>
<div class="captcha-image" id="captcha-image-box-contacts">
<img id="captcha-reload" class="captcha-reload" src="url/skin/frontend/base/default/images/reload.png" alt="Reload captcha" onclick="$('contacts').captcha.refresh(this)">
<img id="contacts" class="captcha-img" height="50" src="url/media/captcha/base/4e10928a37926a4c5363ef538901076d.png">
</div>
<script type="text/javascript">//<![CDATA[
$('contacts').captcha = new Captcha('url/index.php/captcha/refresh/', 'contacts');
//]]></script>
</li>