Hi Bob,
That isn't an entirely accurate description of my problem.
I want to re-use a fair bit of form layout and most fields in several forms. I just need to adjust some variables. I have chosen to copy and paste the wizard code into a file, set the form code to custom and included require('') to a php file containing the form manager code. I leave the show html action in the form. All fine except that the captcha image doesn't appear. The code is there as you can see below.
How do I force that {chronocaptcha_img} to expand to the image? I presume that is the problem. Can I make it work this way or will I have to include the php captcha code myself?
That isn't an entirely accurate description of my problem.
I want to re-use a fair bit of form layout and most fields in several forms. I just need to adjust some variables. I have chosen to copy and paste the wizard code into a file, set the form code to custom and included require('') to a php file containing the form manager code. I leave the show html action in the form. All fine except that the captcha image doesn't appear. The code is there as you can see below.
How do I force that {chronocaptcha_img} to expand to the image? I presume that is the problem. Can I make it work this way or will I have to include the php captcha code myself?
<div class="ccms_form_element cfdiv_text label_over" id="idchrono_captcha_input_container_div" style=""><label for="idchrono_captcha_input">Type the code in the box below into the box on it's left.</label><input id="idchrono_captcha_input" maxlength="5" size="5" class="chrono_captcha_input" title="" type="text" container_id="78" wf_key="127" value="" name="chrono_verification" />
{chronocaptcha_img}<div class="small-message">We need this to be sure that you are a person. Machines cannot read these characters</div>
<div class="clear"></div>
<div id="error-message-chrono_verification"></div>
</div>
Hi Nick,
I ran some experiments and it looks as though the Image is placed using a search and replace on the Form HTML before the PHP evaluation is run that loads the included file.
There are a couple of options here.
a) You could add the code into the included file, this is probably the least desirable.
b) You can remove the Image-verification and Submit button code from the included file and add them to the Form Code box after the PHP include. This works OK.
c) My personal preference - where it fits with the form - is to include code using a Custom Element element (or elements) in the Preview box. That way I can mix and match included code with standard elements.
Bob
I ran some experiments and it looks as though the Image is placed using a search and replace on the Form HTML before the PHP evaluation is run that loads the included file.
There are a couple of options here.
a) You could add the code into the included file, this is probably the least desirable.
b) You can remove the Image-verification and Submit button code from the included file and add them to the Form Code box after the PHP include. This works OK.
c) My personal preference - where it fits with the form - is to include code using a Custom Element element (or elements) in the Preview box. That way I can mix and match included code with standard elements.
Bob
Thanks Bob. I think I understand b) (disregarding a) on your advice) but c) I will need to play with and see if I can follow that. Thanks for your fast reply as usual. I will try it out tomorrow morning.
Nick
Nick
Hi Nick,
The code for my (b) test looks like this:
Bob
The code for my (b) test looks like this:
<?php
include (JPATH_SITE.DS.'components'.DS.'com_chronoforms'.DS.'includes'.DS.$form->form_details->name.DS.'form_html.php');
?>
<div class="ccms_form_element cfdiv_text" id="chrono_verification1_container_div" style="">
<label>Enter the code</label><input maxlength="5" size="5" class="chrono_captcha_input" title="" type="text" wf_key="2" value="" name="chrono_verification"> {chronocaptcha_img}
<div class="clear"></div>
<div id="error-message-chrono_verification"></div>
</div>
<div class="ccms_form_element cfdiv_submit" id="input_submit_31_container_div" style="text-align:left">
<input name="input_submit_3" class="" value="Submit" type="submit">
<div class="clear"></div>
<div id="error-message-input_submit_3"></div>
</div>Bob
Thanks Bob. I have tried that so.
And I have loaded that code in the displayForm block here
[attachment=0]4Bob01.png[/attachment]
But I still get this as the output.
[attachment=1]4Bob00.png[/attachment]
I must have missed something somewhere. Can you put me right? I am still on Joomla 1.5 by the way.
<?php require('components/com_u3arenew/applyMemberFront.php'); ?>
<div class="ccms_form_element cfdiv_text" id="chrono_verification1_container_div" style="">
<label>Enter the code</label><input maxlength="5" size="5" class="chrono_captcha_input" title="" type="text" wf_key="2" value="" name="chrono_verification"> {chronocaptcha_img}
<div class="clear"></div>
<div id="error-message-chrono_verification"></div>
</div>
<div class="ccms_form_element cfdiv_submit" id="input_submit_31_container_div" style="text-align:left">
<input name="input_submit_3" class="" value="Submit" type="submit">
<div class="clear"></div>
<div id="error-message-input_submit_3"></div>
</div>
And I have loaded that code in the displayForm block here
[attachment=0]4Bob01.png[/attachment]
But I still get this as the output.
[attachment=1]4Bob00.png[/attachment]
I must have missed something somewhere. Can you put me right? I am still on Joomla 1.5 by the way.
Hi Nick,
It needs to be a Custom Element element in the Preview box rather than a Custom Code element in the On Load event.
Bob
It needs to be a Custom Element element in the Preview box rather than a Custom Code element in the On Load event.
Bob
This topic is locked and no more replies can be posted.
