View Full Version : Help: custom field - acceptance of terms of use
globalone
12-05-2006, 04:08 PM
Hi everybody,
I have added a custom field (required field) called "conditions" linked to the terms of use of the website. It is appearing only in the suggest link form with radio buttons to get the answer "yes" or "no".
Mainly what I would like to do is to oblige the editor to check "yes" in order to accept the terms of use.
What kind of code could I add to refuse the sumission if the user checked "no" or to warn him about that? :crazy-be:
See picture enclosed
Thanks for your help :kiss:
Nathalie
Dave Baker
12-05-2006, 04:52 PM
Hello globalone,
I think you can resolve it without additions of additional fields through Admin Panel.
***Open suggest-link.tpl and find code***
{if $config.captcha}
<p class="field"><img src="{$config.base}{$config.dir}plugins/captcha/image.php?{php} echo time(){/php}" alt="captcha" /><br /><input type="text" name="security_code" /></p>
{/if}
***Below this code add***
<input type="radio" name="confirmation" value="0" id="confirmation0" checked />No
<input type="radio" name="confirmation" value="1" id="confirmation1" />Yes
***Save file***
***Open suggest-link.php and find code***
if ($category['locked'])
{
$error = true;
$msg = "<li>{$gDirLang['error_category_locked']}</li>";
}
else
{
***Below this code add***
if (!$_POST['confirmation'])
{
$error = true;
$msg = "<li>You cannot suggest the link as you do not agree with conditions</li>";
}
***Save file***
globalone
12-06-2006, 11:38 AM
Dave
An ENOURMOUS kiss for you :air-kiss:
Everything is working fine :yahoo:
See the result enclosed (sorry in French)
Thanks a lot :applause:
Nathalie
Dave Baker
12-07-2006, 05:31 PM
You're welcome Nathalie
Holger Veith
12-20-2006, 02:35 AM
Not working for me ... send a ticket
paypal2go
04-12-2007, 07:39 PM
got mesage:
"You cannot suggest the link as you do not agree with conditions"
but i was check agree
please try (http://acceptspaypal.indymart.net/suggest-link.php?id=0) and help fix it.
Hello globalone,
I think you can resolve it without additions of additional fields through Admin Panel.
***Open suggest-link.tpl and find code***
{if $config.captcha}
<p class="field"><img src="{$config.base}{$config.dir}plugins/captcha/image.php?{php} echo time(){/php}" alt="captcha" /><br /><input type="text" name="security_code" /></p>
{/if}
***Below this code add***
<input type="radio" name="confirmation" value="0" id="confirmation0" checked />No
<input type="radio" name="confirmation" value="1" id="confirmation1" />Yes
***Save file***
***Open suggest-link.php and find code***
if ($category['locked'])
{
$error = true;
$msg = "<li>{$gDirLang['error_category_locked']}</li>";
}
else
{
***Below this code add***
if (!$_POST['confirmation'])
{
$error = true;
$msg = "<li>You cannot suggest the link as you do not agree with conditions</li>";
}
***Save file***
Dave Baker
04-14-2007, 05:40 PM
Hello paypal2go,
AFAIR, that code was not intended for version Pro2.1.xx
Try it:
***Open suggest-link.tpl and find code***
{if $config.captcha}
<p class="field"><img src="{$config.base}{$config.dir}plugins/captcha/image.php?{php} echo $_SERVER['REQUEST_TIME']{/php}" alt="captcha" /><br /><input type="text" name="security_code" /></p>
{/if}
***Below add***
<input type="radio" name="confirmation" value="0" id="confirmation0" checked />No
<input type="radio" name="confirmation" value="1" id="confirmation1" />Yes
***Save file***
***Open suggest-link.php and find code***
// show verify page
if (!empty($_POST['verify_info']) && ($action != 'edit') || ($action == 'add'))
{
if ($category['locked'])
{
$error = true;
$msg = "<li>".$gDirLang['error_category_locked']."</li>";
}
***Below add***
elseif ($_POST['verify_info'] && empty($_POST['confirmation']))
{
$error = true;
$msg = "<li>You cannot suggest the link as you do not agree with conditions</li>";
}
***Save file***
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.