Why is a simple form with insert mode only in Scriptcase V8 such complicated??

Dear community,

I am a newbie with Scriptcase V8 (in former times I tried Scriptcase V2 and then CodeCarge Studio, but there are no further developments in the moment -> mobile devices).

I have to develop a simple Internet form with insert mode only, say for a job application. The Internet user should not have any insight in all my other job applicants! Editing mode of the form is not allowed.

What have I done:

  1. I generated a menu and linked it with my form and displayed it in insert mode via macro sc_apl_conf(“my_form”, “start”, “new”); i.e. in the onexecute of the menu.

  2. I entered some data in the form and pressed button insert. An error message appears: “error with insert, dataset exists already”. This means, the primary key of my mysql dataset did not automatically increment.

  3. There remains a “Cancel” button, which brings me back in edit mode, what should not be possible for the user.

  4. In community threads I have seen a discussion about macro sc_redir(), but I have not exact description, how to handle this.

Dear community, please help. Does anywhere exist a step for step description, which handles with forms in insert mode only?




You can remove any / all SC buttons you do not want to appear (e.g. Cancel) by setting the buttons in the Toolbar element of the form’s setup. This includes the the SC Insert button, and add your own for complete control - PHP and adding your own INSERT SQL etc. However, the normal Insert should work fine.

Need a little more info: Are you sure your MySQL field is set as AI? Are there any other tables involved?

Dear adz1111,

thank you very much for answering. You was right, in MySQL the “AI” option was not set and with your comment I could make invisible the “cancel”-button.

Thank you and best wishes