How hide the OK button from a forced insert by a text field

Hello all,
I got a text field placed on a block where I inserted within the help some code just to make the insert of the form and then show the subform New entry. Otherwise user do not see the New button and rows on the subform.
My goal is to eliminate the “[SIZE=+2]OK[/SIZE]” button that appears when I try to insert the record by code in order to make appear the master/details sub form for insert items…
I don’t know if there are more smart method but user, as you know well, want to click something once only .

To more clear understanding let’s look to attachment

Is there a trick or a workaround ??

Many thanks !!!
Giovanni

This is my field help code

<a href=“javascript: nm_atualiza (‘incluir’);” id=“sc_b_ins_t” onclick=“nm_atualiza (‘incluir’); return false;” title=“Add item xxxxxx” style=“vertical-align: middle; display:inline-block;”>
<img src=“URL OF IMAGE BUTTON” style=“border-width: 0px”>
</a>

SC_INCLUIR.jpg

Sorry, I don’t know how to prevent this unnecessary button from popping up. I found this while searching for an answer. In my case, I created a PHP button to send an email, and I filled in the confirmation message. So then the user got the nice confirmation message AND they got the screen that you showed with just an OK button. BTW, I thought that “confirmation” meant a warning before the button executed, i.e., please confirm that you want to do this dangerous thing, but of course it runs afterward.

Since I needed to give them some feedback, my work-around was to remove the confirmation message entirely, and type it as an echo statement at the end of my PHP for the button. Now the user gets no nicely formatted confirmation, but they do get the dumb OK button below my echo. So it works OK for me. Still, I’d rather get rid of the OK screen entirely. If someone knows how to do that, I’d appreciate it. If no one does, perhaps this work-around will help someone else.

Just do a sc_redir

I think that sc_exit will also do the job

Awesome answer, @jlboutin60!

sc_exit(sel) works great! Took me a couple tries to bring the user back to the same record on the same form. I didn’t want to try and “find my place” again with the sc_redir() and a parameter although I think you’re right, that would work. So with sc_exit(sel) I take the user back to the same form that he or she selected from a grid, and I can use the nice confirmation message again.

I really appreciate the help! Makes it work and look a lot better.

Thank you for the feedback