cancel
Showing results for 
Search instead for 
Did you mean: 

Disabling the submit button when nothing has been entered

Former Member
0 Kudos

Hi,

I have a simple order form with a 'running total' of quantities ordered at the top of the form, calculated thus (FormCalc):

 

$ = sum(Products.PRODUCT_GROUPS.DATA[*].PRODUCTS.DATA[*].Quantity)

If this quantity is zero (i.e. nothing has been ordered) then I want to prohibit the form being submitted by email. I thought the best way of doing this would be to hide the submit button when this field is zero, and show it when > 0.

I tries appending this code to the same calculate event of this field:

if ( $ > 0 )  then   

    Button1.presence= "visible"

else

    Button1.presence= "hidden"

endif

but no go.

Sorry if this is real simple, but I'd appreciate help!

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Nigel,

You have to provide relative path of button with respect to the total field then it will work.

If you find my solution helpful then rate accordingly.

Thanks

Rohit