The HtmlMobile command looked promising to do something like
Code: Select all
HtmlMobile("<textarea id='txt1' name='txt1' rows='4' cols='50'></textarea>")The commands available for Mobile seem very limited compared to the commands for Web
Code: Select all
HtmlMobile("<textarea id='txt1' name='txt1' rows='4' cols='50'></textarea>")You can set and get the text using the .value property:Paul wrote: Tue May 05, 2026 12:53 ambut then how to get the text from it like GetMobileText(#Mobile) command?Code: Select all
HtmlMobile("<textarea id='txt1' name='txt1' rows='4' cols='50'></textarea>")
Code: Select all
Procedure SetTextAreaText(id.s, text.s)
!var textarea = document.getElementById(v_id);
!if(textarea) textarea.value = v_text;
EndProcedure
Procedure AppendTextAreaText(id.s, text.s)
!var textarea = document.getElementById(v_id);
!if(textarea) textarea.value += v_text;
EndProcedure
Procedure.s GetTextAreaText(id.s)
!var textarea = document.getElementById(v_id);
!if(textarea) return textarea.value.toString();
EndProcedure
If ContainerMobile(#PB_Any, #PB_Mobile_Page, "margin:8px")
HtmlMobile("<textarea id='txt1' name='txt1' rows='4' cols='50'></textarea>")
HtmlMobile("<br/>")
HtmlMobile("<textarea id='txt2' name='name' rows='4' cols='50' wrap='off' style='resize:none; color:RGBA(0,200,200,1); background:RGBA(50,50,50,1);'></textarea>")
SetTextAreaText("txt1", "TextArea 1 text.")
AppendTextAreaText("txt1", ~"\nSome more text.")
SetTextAreaText("txt2", "TextArea 2 text.")
Debug GetTextAreaText("txt1")
Debug "-----"
Debug GetTextAreaText("txt2")
Debug "-----"
CloseMobileContainer()
EndIf