Expand my Community achievements bar.

How to set relationship inside two fields

Avatar

Level 1

Hi, All.

I set a simple form.for online using.

However, I met a trouble in desining.

eg: There are five fieds in the form. There names are Account No, Accout Name, Alternative No, Memo and I want to type an alternative No checkbox..

Among the rest, there is a control between  the checkbox that is I want to type an alternative No and the filed taht is Alternative No

If a user check the I want to... checkbox, the Alternative No  field can be typed.

If the user uncheck the I want to... checkbox, the Alternative No  field will be turned grey and can't be typed.

Unfortunately, I don't find the function can be implement like above operations.

Could you help me?

Shane

5 Replies

Avatar

Level 6

Hi,

I made your form dynamic, now you can type something in fields. Also i added some script to reach your requrement related I want to... checkbox and the Alternative No  field.

See attacment.

BR,

Paul Butenko

Avatar

Level 1

Thank you for your quick reply.

I notice the form that  is added  JavaScript to change event for reaching my requirement.

i.e.

if ($.rawValue==1) then
alterNo.access = ""
else
alterNo.access = "readOnly"
endif

Supplement:

If one user uncheck the I want to.... checkbox, the Alternative No filed will be gray and clean pre-tyoed characters.

How do I change the above code for reaching like this requirement.

THX

Avatar

Level 6

Hi,

I added some code to reach what you want:

if (this.rawValue==1) {

alterNo.access

= "";

alterNo.fillColor

= "255,255,255";

}

else {

alterNo.access

= "readOnly";

alterNo.fillColor

= "150,150,150";

alterNo.rawValue

= "";

}

See attach.

BR

Avatar

Level 1

Hi,

Thank you for your assistant.

But, I find there is a  defect.

Reproduced Steps

  1. Check I want to... checkbox.
  2. Unchek I want to... checkbox.
  3. Check I want to... checkbox
  4. You will find  can't  type any characters in  the Alternative No. field . In fact,,we should type any characters in this state.

BR.

Shane

Avatar

Level 6

Hi,

I reproduced your steps, but didn't find any problem. When checkbox is marked you can type anything you wnat into alternative text.