how to hide field on load and appear on submit

jho
Kilo Contributor

How to I hide field on load and make the field appear on submit? I have managed to create a UI policy that allow me to hide a field on load.

How do I make the field appear on submit?

7 REPLIES 7

Harsh Vardhan
Giga Patron

Hi Jason,



agreed with @shishir , your requirement is conflicting. once you will submit or save the form it will reload the page and you have already created an UI Policy to hide the field at loading time.


so in both scenario it will hide it.



if it's new record then you can use g_form.isNewRecord(). if it does not help try to add few more condition in your requirement then you can able to solve it.



function onLoad() {


    //Type appropriate comment here, and begin script below


if(g_form.isNewRecord())


{


g_form.setDisplay('<field name>',false);


alert('hellow');


}


   


}




Let me know if you have any further question.


That is exactly what I was looking for. Thank you.


Hi Jason,



if i answered your quires then please mark the answer correct and close this thread.



How To Mark Answers Correct From Community Inbox