How do I use the ReCaptcha with submitcontent?
Forums
submitcontent and ReCaptcha
Hi,
you need to add a new element to the form and set its text to {ReCaptcha} and enable the ReCaptcha plugin for this form under the plugins tab and configure it well!
Regards
Max
you need to add a new element to the form and set its text to {ReCaptcha} and enable the ReCaptcha plugin for this form under the plugins tab and configure it well!
Regards
Max
I'm having problems getting it to work could you look at my code and tell me what I'm doing wrong? I wanted to make sure it didn't display if the user is logged into there account.
<div class="form_item">
<div class="form_element cf_heading">
<h1 id="" class="cf_text">Got a Joke or Fact? Submit it!</h1>
</div>
<div class="clear">
</div>
</div>
<div class="form_item">
<div class="form_element cf_text">
<span class="cf_text">To submit a joke simply put in a title for your
joke <br>then put the joke in and then finally put in the name you would
like to appear next to your joke in our newsletter.<br>
If you would like to submit a fact please put FACT in the title box and
your fact in the story body!</span></div>
</div>
<div class="form_item">
<div class="form_element cf_heading">
<h3 id="" class="cf_text">Please submit something meaningful or it will
be deleted, no "blah blah" text or so!</h3>
</div>
<div class="clear">
</div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label">Title:</label><input id="text_5" class="cf_inputbox required" maxlength="150" name="title" size="30" type="text"><a class="tooltiplink" onclick="return false;"><img border="0" class="tooltipimg" height="16" src="components/com_chronocontact/css/images/tooltip.png" width="16"></a><div class="tooltipdiv">
Title: :: Your story title please!</div>
</div>
<div class="clear">
</div>
</div>
<div class="form_item">
<div class="form_element cf_textarea" style="width: 100%;">
<label class="cf_label">Story body:</label> <?php
$editor =& JFactory::getEditor();
echo $editor->display( 'introtext', '' , '100%', '400', '70', '15', false ) ;
?></div>
<div class="clear">
</div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label">Your name:</label>
<input value="<?php
$user =& JFactory::getUser();
if ($user->guest) {
echo "";
} else {
echo $user->username;
}
?>" class="cf_inputbox required" maxlength="30" size="30" id="text_7" name="created_by_alias" type="text">
<a class="tooltiplink" onclick="return false;"><img border="0" class="tooltipimg" height="16" src="components/com_chronocontact/css/images/tooltip.png" width="16"></a><div class="tooltipdiv">
Your name: :: Your nickname as you like it to appear with the story!</div>
</div>
<div class="clear">
</div>
</div>
<div class="form_item">
<div class="form_element cf_captcha">
Please enter both words exactly as they are display with the space
between them.<label class="cf_label"><br>{ReCaptcha} </label></div>
<div class="clear">
</div>
</div>
<div class="form_item">
<div class="form_element cf_button">
<input name="undefined" type="submit" value="Submit Story"></div>
<div class="clear">
</div>
</div>
Ok I got it to display but the box you type in is off on the form. And I'm still not able to figure out how to make it not required if your logged into the site.
http://beta.myjokemail.com/index.php?option=com_content&view=article&id=1396&Itemid=9
http://beta.myjokemail.com/index.php?option=com_content&view=article&id=1396&Itemid=9
Hi mkabwilliams,
You can get the input box back in place by removing one of the Divs that ChronoForms wraps round the input - the cf_inputbox one I think. The ChronoForms css overrides the ReCaptcha formatting.
At the moment I don't think that there is ny way to remove it for registered users without hacking the code. Maybe I can add that for a future release. You can hide the input box easily enough but when you submit the result will be rejected :-(
The fix for the time being would be to add a ReCaptcha manually and make both parts conditional.
Bob
You can get the input box back in place by removing one of the Divs that ChronoForms wraps round the input - the cf_inputbox one I think. The ChronoForms css overrides the ReCaptcha formatting.
At the moment I don't think that there is ny way to remove it for registered users without hacking the code. Maybe I can add that for a future release. You can hide the input box easily enough but when you submit the result will be rejected :-(
The fix for the time being would be to add a ReCaptcha manually and make both parts conditional.
Bob
Hi,
This code should reset the plugins set to run when the form is viewed but it will not affect those run when submitted, this will be available in the coming release though, so this may be possible starting from RC5.1
Cheers
Max
This code should reset the plugins set to run when the form is viewed but it will not affect those run when submitted, this will be available in the coming release though, so this may be possible starting from RC5.1
$user =& JFactory::getUser();
if($user->id){
$MyForm->setFormParam('plugins', '');
}
Cheers
Max
This topic is locked and no more replies can be posted.