I am making a form and I want one checkbox and I want to be to click once for "check", click twice for "cross" and then click again for blank. Then if that is possible I would like to go one step further and if the checkbox is a "cross" then I would like it to make a text box red. Any help is appreciated. I have tried many things but nothing has worked.
Solved! Go to Solution.
Views
Replies
Total Likes
Awesome it worked. Even when I did a direct copy and paste from your document to my document it didn't work but then I copied my form to your document and it worked.
Thank you so much.
Views
Replies
Total Likes
I understand you right?
Views
Replies
Total Likes
No, I just want one check box that I can put change from "check' to 'cross' to neutral.
Views
Replies
Total Likes
Sorry, yes I know.
First row is the first status.
Second row the second status.
Third row the third status.
You want tho have these three rows in one row.
That's what I mean.
Views
Replies
Total Likes
Yes, exactly
Views
Replies
Total Likes
I have to think about...
Different colors are not an option for you?
Views
Replies
Total Likes
I would rather not but it could work.
Views
Replies
Total Likes
It will works with the following:
Reference_Syntax.mark = "default | check | circle | cross | diamond | square | star"
Copy the script in the checkbox change-event:
if (NameOfCheckBox.resolveNode("ui.#checkButton").mark == "check")
{
NameOfCheckBox.resolveNode("ui.#checkButton").mark = "cross";
NameOfTextField.border.edge.color.value = "255,255,255";
}else if (NameOfCheckBox.resolveNode("ui.#checkButton").mark == "cross")
{
NameOfCheckBox.rawValue == 0;
NameOfTextField.border.edge.color.value = "245,245,0";
}else
{
NameOfCheckBox.resolveNode("ui.#checkButton").mark = "check";
NameOfTextField.border.edge.color.value = "255,255,255";
}
I hope it will helpful,
Mandy
Views
Replies
Total Likes
There are a litte mistake, let me check it.
- First you have to give the TextField a border in white. Then will work the border script.
You can change the checkbox style but you have to save the current checkbox status in a variable...
Views
Replies
Total Likes
I was wrong..you have to change under object "staes" in on/off/neutral and then we scripted with then binding:
if(this.rawValue ==1)
{
//app.alert(this.rawValue);
this.resolveNode("ui.#checkButton").mark = "check";
Textfeld1.border.edge.color.value = "255,255,255";
}else if (this.rawValue == 0)
{
//app.alert(this.rawValue);
this.resolveNode("ui.#checkButton").mark = "cross";
Textfeld1.border.edge.color.value = "245,245,0";
}else
{
//app.alert(this.rawValue);
this.rawValue == 0;
Textfeld1.border.edge.color.value = "255,255,255";
}
There is a little mistake in the order. At the moment I don't see the mistake. Maybe it's too late. I have night in germany. Perhaps you can try a little bit.
At the moment first come is the cross, second come is the check, third is blank an a colored TextField..
I hope really it will helps you,
Mandy
Views
Replies
Total Likes
I haven't be able to get it working yet. Do I have the object properties correct?
Field:
States:On/Off/Neutral
Check Style: Check
Value:
Default: Off
Data Binding:
On Value: 1
Off Value: 0
Neutral Value: 2
First click I am getting a grey check, second click I am getting a black check and yellow border around the text box, third click blank, yellow border remains around text box.
Views
Replies
Total Likes
Ignore my last response. I had seen your new post. I will try it and get back to you.
Views
Replies
Total Likes
same result.
Views
Replies
Total Likes
My result is:
First click - grey cross
second - black check
third - blank and a yellow border around the textbox
Views
Replies
Total Likes
I will keep trying.
Views
Replies
Total Likes
The javascript debugger gives me a syntax error.
Everything is ok when I change "this" in the Objectname of the checkbox.
Then the debugger is ok.
But the script works not correct.
For the first I got grey check - black check - blank and then grey cross - black check - blank
I have the same object properties.
Views
Replies
Total Likes
Try this:
Put this in the mouseDown event of your check box:
if (this.rawValue==0){
this.resolveNode("ui.#checkButton").mark="check";
Textfield1.border.edge.color.value = "255,255,255";
}
else if (this.resolveNode("ui.#checkButton").mark=="check"){
this.resolveNode("ui.#checkButton").mark="cross";
Textfield1.border.edge.color.value = "255,0,0";
}
else{
this.resolveNode("ui.#checkButton").mark="check";
Textfield1.border.edge.color.value = "255,255,255";
}
mouseUp event:
if (this.resolveNode("ui.#checkButton").mark=="cross")
this.rawValue=1;
Kyle
Views
Replies
Total Likes
I can't seem to get it working when I click it goes light grey cross, 2nd click black cross, 3rd click blank.
Views
Replies
Total Likes
Oh right, make sure it is set to States: On/Off not On/Off/Neutral.
Kyle
Views
Replies
Total Likes
Unfortunately still not working, now I get "cross" on first click, blank on second click. I can't figure out what is the problem the formula looks correct to me.
Views
Replies
Total Likes
Make sure Check Style is Check.
Kyle
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies