Dave Troxel
Posts: 0
Joined: Fri May 09, 2014 1:07 pm

set value of input to 'null'

I want to use button 'on click' event to set property of input field to 'null'. Basically clear whatever it currently in the input, making it empty again.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

set value of input to 'null'

Hi Dave,

Did you check this section?
http://devcenter.appery.io/documentat...

Dave Troxel
Posts: 0
Joined: Fri May 09, 2014 1:07 pm

set value of input to 'null'

I don't know what model and storage has to do with my question. And if the answer is buried in there, I wouldn't know it if jumped up and bit me. Can you please draft up an illustration of what I can do to make this happen? Something us simple folks can understand? Please?

I tried setting button click to this:

function Clear()
{
document.getElementById("RxName_forminput").value= "";
document.getElementById("RxDose_forminput").value= "";
document.getElementById("RxFreqNum_selectmenu").value= "#";
document.getElementById("RxFreqPer_selectmenu").value= "how often";
document.getElementById("RxNotes_forminput").value= "";
document.getElementById("RxNum_forminput").value= "";
document.getElementById("RxPharmacy_forminput").value= "";
document.getElementById("RxPhone_forminput").value= "";
document.getElementById("RxStoreNum_forminput").value= "";
}

Didn't work. SOmeone please help me.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

set value of input to 'null'

Dave,

Use this code to clear Input fields:pre$("input").val("");/pre

Dave Troxel
Posts: 0
Joined: Fri May 09, 2014 1:07 pm

set value of input to 'null'

Not sure how this is supposed to work. How and where do I put the code?
These do not work:
Image

Image

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

set value of input to 'null'

Dave,

You should run JavaScript on some event:

code$("[name=input_name]").val(""); /code

оr

codeAppery("input_name").val("");/code

where "input_name" is the name of input component

Dave Troxel
Posts: 0
Joined: Fri May 09, 2014 1:07 pm

set value of input to 'null'

Thank you Evgene.

Return to “Issues”