How to accept terms?

knert

No avatar

2006-04-04 11:15

Hi there,

I'm busy to implement a checkbox with accepting terms before proceeding.

Now I read the thread from Wizzud, but unfortenately it seems not to work for me, so i think i made a mistake:

What i did was in the order_delivery template:

,Array(/accept/,"checkbox",1,"Deliveryform","You must tick the Terms and Conditions checkbox!")

And the checkbox:

<input type="checkbox" name="accept" value="checkbox" id="Deliveryform" />

The error I recieve is when the checkbox is empty I get the warning: you must click terms etc...

When I click the checkbox...I still get the same warning.

What am I doing wrong?

Any help would be appreciated!

Thnx.

Knert.

Amber

No avatar

2006-04-04 12:48

I would like to know this too! I do not exactly understand why this is not standard or a plugin for this shop? It is important.

Amber

treewood (OpenSolution)

Avatar: treewood

2006-04-04 13:47

knert - maybe better will be select? create select with 2 options "yes", "no" ... and check value of this select

Knert

No avatar

2006-04-04 14:41

Hi Treewood,

Thnx for your quick response.

The problem with that is when you do a yes/no checkbox these data MUST be on the orderprint/e-mail. (when someone checks: 'no' and i get the order I never will know if he agreed to the terms)

When you do a obligation of the checkbox in the checkoutfield (so that that the box MUST be checked before sending the data) you don't need all of this above.

I hope you understand the difference. My english is not that good :-(

Knert

treewood (OpenSolution)

Avatar: treewood

2006-04-04 16:29

Knert - i wrote: "and check value of this select". create for example select:
<select name="agree">
<option value="1">yes</option>
<option value="">no</option>
</select>

and check by checkForm (onsubmit) for example
,Array( 'agree', 'simple', 'YOU MUST AGREE OR I WILL HUNT YOU DOWN!' )

Ernold

Avatar: Ernold

2007-02-28 09:01

so should I put these rows in the orders_delivery.tpl under line
" ,Array( 'iCourier', 'simple', '$lang[Choose_courier]' ) "

first,
,Array(/accept/,"checkbox",1,"Deliveryform","You must tick the Terms and Conditions checkbox!")

and under,
<tr class="tfoot">
<td colspan="4">
<input type="submit" value="$lang[send]" class="submit" />
</td>
</tr>
this,
<tr>
<td>
<input type="checkbox" name="accept" value="checkbox" id="Deliveryform" />
</td>
</tr>

Or how this works ?

Ernold

Ernold

Avatar: Ernold

2007-03-13 13:04

Is there plugin for this "I accept terms.." button or directions somewhere how to add this functionality ?

Ernold

treewood (OpenSolution)

Avatar: treewood

2007-03-14 07:55

Ernold - no there is no plugin

valpenguin

No avatar

2007-03-15 17:34

not work :(

Cagonni

No avatar

2007-03-25 08:59

http://www.dynamicdrive.com/dynamicindex16/acceptterm.htm

try this ;)

treewood (OpenSolution)

Avatar: treewood

2007-03-25 22:32

This may be a simpler solution --
The submit button is (disabled) until the checkbox is checked - the checkbox has an onclick event that enables/disables the submit button - very simple -- no long extra lines of code all these are form elements so they should work within the structure of the extisting form on the page

<td><input name="submit" type="submit" / disabled="disabled" value="- Submit -" /></td>

<td><input name="Agree" type="checkbox" class="style3" id="Agree" onClick="this.form.elements['submit'].disabled = !this.checked;" value="Yes">
&nbsp;I agree to terms and conditions</td>

valpenguin

No avatar

2007-03-27 17:14

<select name="agree">
<option value="1">yes</option>
<option value="">no</option>
</select>

and check by checkForm (onsubmit) for example
,Array( 'agree', 'simple', 'YOU MUST AGREE OR I WILL HUNT YOU DOWN!' )

A treewood solution, Work fine on QC 2.1 :)

Back to top
about us | contact