This topic is locked
[SOLVED]

Hide field in inline edit

4/30/2021 3:00:35 PM
PHPRunner General questions
L
luchoadmin author

hello I want to hide a field in online edit and when trying in javascript onload no effect occurs if i do it in ilineadd it works perfect.

var ctrl = Runner.getControl(pageid, "Producto");
if(ctrl.getValue() != "Contenedor")
pageObj.hideField("Contenedor");
ctrl.on('change', function(){
if (this.getValue() == "Contenedor"){
pageObj.showField("Contenedor");
}
else {
pageObj.hideField("Contenedor");
}

});

can you help me?

admin 4/30/2021

Just in case make sure you are adding this code to Javascript OnLoad event of the Edit page.

L
luchoadmin author 5/1/2021

yes i'm doing it in that place

L
luchoadmin author 5/4/2021

hello, sorry for the incident
any other idea?

admin 5/4/2021

The same code should work for both inlide Add and inline Edit, assuming that you have added it to both Javascript OnLoad events.

More reading and watching:
Troubleshooting Javascript errors

Video on the same topic

L
luchoadmin author 5/11/2021

thank You, solved