wittenra 0 Posted February 6, 2017 Report Share Posted February 6, 2017 Hi there, I have a form with a field, which will be prefilled, but this field is a text box and editable for everyone. But i want it only as a readonly field, but this field can´t be changed directly to a html field, so i was wondering, is it possible to copy the body of that field and show it as readonly and only, if it is not empty? I do not want to use a button for that Thanks a lot in advance Quote Link to post Share on other sites
WoHe 2 Posted February 6, 2017 Report Share Posted February 6, 2017 Could you tell me more specific what you want to do? As I see it, you've got in input field with type=text and you want to copy the text from this input field into another element. I should do this with javascript: var text = document.getElementById("[id of the input field]").value; document.getElementById("[id of the other element]").innerHTML = text; 1 Quote Link to post Share on other sites
wittenra 0 Posted February 6, 2017 Author Report Share Posted February 6, 2017 thx, that´s it already! you helped a lot! Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.