rado
Posts: 221
|
| Posted: 12/07/2008, 4:21 PM |
|
I need to insert the value from popup window into the label instead of the text box in record. The whole popup window solution works just fine, however when I change the textbox field to label I'm not getting any result. The label is not even visible (since there is not data assigned to it). When I change the field attribute from textbox to label the format tab in the properties of label is empty. My original idea is to insert user id from popup window into label of record, which is not editable (however it is in "insert mode"). Rest of the fields are just text box fields that need to be populated after the user_id is retrieved from popup window.
Any idea how can I accomplish this.
Thanks, Rado
|
 |
 |
DonP
|
| Posted: 12/07/2008, 5:41 PM |
|
You can add a Before Show event to the Label to make it show whatever
the popup shows. It wouldn't exactly be getting it FROM the popup window
but it would use the same source so will be the same thing.
Don (DonP)
rado wrote:
> I need to insert the value from popup window into the label instead of the text
> box in record. The whole popup window solution works just fine, however when I
> change the textbox field to label I'm not getting any result. The label is not
> even visible (since there is not data assigned to it). When I change the field
> attribute from textbox to label the format tab in the properties of label is
> empty. My original idea is to insert user id from popup window into label of
> record, which is not editable (however it is in "insert mode"). Rest of the
> fields are just text box fields that need to be populated after the user_id is
> retrieved from popup window.
>
> Any idea how can I accomplish this.
>
> Thanks, Rado
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.yessoftware.com/
>
|
|
|
 |
rado
Posts: 221
|
| Posted: 12/07/2008, 7:05 PM |
|
Thaks Don.
Which action should I use to retrieve data from popup window.
Rado
|
 |
 |
rado
Posts: 221
|
| Posted: 12/08/2008, 8:34 AM |
|
Any idea?
|
 |
 |
rado
Posts: 221
|
| Posted: 12/09/2008, 9:03 AM |
|
Hi Don,
Could you please help me and tell which action should I use in Before Show event to get value from popup window. I try to use Dlookup, however I dind't get any result.
Please help if you can.
Rado
|
 |
 |
maxhugen
Posts: 272
|
| Posted: 12/11/2008, 3:56 PM |
|
Rado, have you tried setting a textbox to readonly?
eg <INPUT NAME="userid" VALUE="{userid}" READONLY>
You can set this control from your popup, but it won't be editable by the user.
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com |
 |
 |
rado
Posts: 221
|
| Posted: 12/11/2008, 4:06 PM |
|
Thanks,
This is what I'm looking for. Should I change HTML code or this is possible trough CCS by setting property of text box?
Thanks again,
Rado
|
 |
 |
rado
Posts: 221
|
| Posted: 12/11/2008, 4:10 PM |
|
I have at least 6-7 record forms where I would like to set readonly attribute for "ID field" in update and delete mode. However in this specific case I need to do that even in insert mode since I'm retrieving data from popup window and there is no need for manual entering data.
Thanks again for help
Rado
|
 |
 |
rado
Posts: 221
|
| Posted: 12/11/2008, 4:24 PM |
|
Yes. I found the way. I set the readonly in Properties/Format of my target text-box.
Thanks a lot maxhugen for idea.
Rado
|
 |
 |
maxhugen
Posts: 272
|
| Posted: 12/12/2008, 2:53 PM |
|
Quote :Thanks again for very useful tip. Would you like to tell me, if you know, how I can use same technique in case when I want to set readonly attribute for fields but just in update/delete mode. I assume that I have to use "before show" event, but I don't know what action to use to update the field attribute if is working environment update/delete.
Rado, in HTML view, replace the word READONLY with a CCS label. In the label's BeforeShow event, use something like this:
global $myForm;
if ($myForm.EditMode)
$Component->SetValue("READONLY");
Cheers
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com |
 |
 |
rado
Posts: 221
|
| Posted: 12/12/2008, 3:26 PM |
|
Thanks,
Let me just clarify. First, I have to set "readonly" in property / format of texbox. After that I have to create label (for example "LABEL1" and then in HTML view, replace the word READONLY with a LABEL1. After that I have to create the label's BeforeShow event.
Thanks for help.
Rado
|
 |
 |
rado
Posts: 221
|
| Posted: 12/12/2008, 3:32 PM |
|
Please note that my field is textbox which I would like to make "readonly" in update/delete mode.
Rado
|
 |
 |
maxhugen
Posts: 272
|
| Posted: 12/24/2008, 8:11 PM |
|
Rado, if you set an input to READONLY, the HTML should look something like:
<input id="login" maxlength="50" value="{login}" name="{login_Name}" READONLY>
You can manually add the word READONLY yourself.
However, what you want is a Label there instead (you don't really need to set the CCs property , just add the Label), so it would look like:
<input id="login" maxlength="50" value="{login}" name="{login_Name}" {SetReadonly}>
Then in the Label's BeforeShow event, add this code:
global $myForm;
if ($myForm.EditMode)
$Component->SetValue("READONLY");
Of course you have to replace $myForm with the name of your form.
Cheers, and Merry Xmas.
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com |
 |
 |
rado
Posts: 221
|
| Posted: 12/29/2008, 9:28 AM |
|
Thanks again for help. Now I understand much better.
Rado
|
 |
 |