Hide/Show HTML button with Client Script

Erik29
Kilo Expert

Hi All, 

I'm having an issue and the suggestions on the portal doesn't get me any further. I have a order guide with some custom HTML widgets to interact with another application. Basically we have repository with all our personnel. Now is the use case that they can submit the order guide without interacting with the custom HTML wich creates the issue that the user record is incomplete and therefore the automated user creation will fail. 

To prevent this from happening i want to hide the next button on the order guide with a catalog client script

I have found that this is the HTML element for the button: 

<button id="submit" ng-hide="guide_step > 1" ng-disabled="submitted || data.sc_cat_item._mandatory.length > 0 || (totalIncluded <= 0 &amp;&amp; guide_step != 0)" name="submit" ng-click="goNext()" class="btn btn-primary padder-lg ng-binding" sn-focus="guide_step < 2" aria-hidden="false">Next</button>

 

Is there anyone who can help me with hiding this button onload? If i know how to hide it i certainly know how to enable it. Please help me:) 

 

1 ACCEPTED SOLUTION

Erik29
Kilo Expert

Unfortunately non of this works. I've fixed it with checking some conditions with a script include and an OnSubmit script to make sure that all the conditions are matched. 

View solution in original post

7 REPLIES 7

I've found this but unfortunately this doesn't do anything. The Even with isolate script on false it simply doesn't work. 

Console doesn't show any errors either. I can simply not understand why it shouldn't work 😞

Erik29
Kilo Expert

@Mohith Devatte i get the following error when i use your method

(g_env) [SCRIPT:EXEC] Error while running Client Script "Set Display False on Next": TypeError: Cannot read properties of null (reading 'getElementById')

Erik29
Kilo Expert

Unfortunately non of this works. I've fixed it with checking some conditions with a script include and an OnSubmit script to make sure that all the conditions are matched.