Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Thiddeninputelement.inputvalue error
Tue, Nov 5 2019 3:35 PMPermanent Link

Kane Jun

EZ-Tech, Inc

Hi all

I am trying to use Thiddeninputelement.inputvalue.
When I assign this value with string I get

'Persistent load error (unable to get property telement_setname of undefined or null reference) '

Please help


Thanks in advance



  TmyForm = class(TForm)
     edit1:thiddeninputelement;
     ...

procedure TmyForm.CheckOutFormCreate(Sender: TObject);
begin            
     edit1.inputvalue:=''; //<- runtime error above
end;
Tue, Nov 5 2019 4:41 PMPermanent Link

Walter Matte

Tactical Business Corporation

What are you trying to accomplish?

Do you want a hidden field on a form submit?  Then put and edit box on the form and Visible := false;.


Declaring -   edit1:thiddeninputelement - does not create it - see WebBtns as an example - you would need to call create method  before you can manipulate the properties.....  in this example CreateElement

 FInputElement:=THiddenInputElement(InterfaceManager.CreateElement(INPUT_ELEMENT_NAME,Element,ELEMENT_CLASS_HIDDENINPUT));


Walter


Kane Jun wrote:

Hi all

I am trying to use Thiddeninputelement.inputvalue.
When I assign this value with string I get

'Persistent load error (unable to get property telement_setname of undefined or null reference) '

Please help


Thanks in advance



  TmyForm = class(TForm)
     edit1:thiddeninputelement;
     ...

procedure TmyForm.CheckOutFormCreate(Sender: TObject);
begin            
     edit1.inputvalue:=''; //<- runtime error above
end;
Tue, Nov 5 2019 5:25 PMPermanent Link

Kane Jun

EZ-Tech, Inc

<<Walter Matte wrote:

What are you trying to accomplish?

Do you want a hidden field on a form submit?  Then put and edit box on the form and Visible := false;.


Declaring -   edit1:thiddeninputelement - does not create it - see WebBtns as an example - you would need to call create method  before you can manipulate the properties.....  in this example CreateElement

 FInputElement:=THiddenInputElement(InterfaceManager.CreateElement(INPUT_ELEMENT_NAME,Element,ELEMENT_CLASS_HIDDENINPUT));


Walter>>

Hi Walter

Thanks a lot

THiddenInputElement(InterfaceManager.CreateElement(INPUT_ELEMENT_NAME,Element,ELEMENT_CLASS_HIDDENINPUT));

This is what I need and it works.




Kane Jun wrote:

Hi all

I am trying to use Thiddeninputelement.inputvalue.
When I assign this value with string I get

'Persistent load error (unable to get property telement_setname of undefined or null reference) '

Please help


Thanks in advance



  TmyForm = class(TForm)
     edit1:thiddeninputelement;
     ...

procedure TmyForm.CheckOutFormCreate(Sender: TObject);
begin            
     edit1.inputvalue:=''; //<- runtime error above
end;
Image