how to add a checkbox to a insert transaction?

piripacchio
Posts: 37
Joined: 2010-04-28 08:34

how to add a checkbox to a insert transaction?

Post by piripacchio » 2010-05-24 10:18

Hi all,
I have a insert transaction on page.
I would like to add a checkbox that need to be checked when inserting the record.
The problem here is that there is no field in the database linked to this checkbox.
Is there a way to validate the form (using the checkbox) without having a specific field in the database?

TIA

tony

User avatar
Fred
Site Admin
Posts: 491
Joined: 2010-02-15 12:10
Location: Armagh, Northern Ireland
Contact:

Re: how to add a checkbox to a insert transaction?

Post by Fred » 2010-05-24 13:39

Hi Tony,
I haven't tried this because I usually record the ticked value even if it is set to "required" in the field validation.

I guess you can start with adding a "Throw Error" behaviour.

Lets say the name of the checkbox is "checkbox".
In the "Advanced" tab enter your condition as follows:

Code: Select all

{POST.checkbox} != 1
That way you can at least check the value of the box.
The only problem is you need to link it to a transaction field and display an error message

Post Reply