Hi, does anyone know a way to get rid of one of th...
# suitescript
e
Hi, does anyone know a way to get rid of one of the submit button added on a suitelet by default? (there is one at the top and one at the bottom)
s
if you want to just hide it, you could do that from your client script. jQuery('#button_id').hide();
m
This button is not added by default at all. You need to call form.addSubmitButton() to add it.
e
Yes, I would like to hide it if possible, I will check that jQuery hack, I would prefer a more native solution. @mattdahse you are right, after that two submit buttons are added by default.
m
I see. You only want 1. I think that’s true of any button you add to a page.
You could recreate a button in HTML in an inline html field, then add client logic to mimic submitting form data but what a pain.
e
Is it really that much trouble to have both?
e
Thanks for both replies, I know too much work for something such simple. @erictgrubaugh based on a requirement a client does not want to see the top button, just the bottom one. There should be an option to hide natively one button.
m
One thing you might consider is using an assistant. Only one set of buttons there, and they render at the bottom.
Not sure if that fits your use case though. Assistants come with a lot of baggage too.
e
Oh, thanks for the suggestion, I have not done any assistants yet, I am not familiar with them. However I have done mostly of the work, this button thing was a nice-to-have from my point of view. Hopefully it will not be a big deal. Thanks again!
e
Yeah seems like a very minor thing where the time could be better spent on bigger goals, but that's just an outsider's judgmental opinion