Forums

toolbar "new"

mduda 14 May, 2015
In cc - I have a report displayed. Works fine.

I'd like to be able to add a new record. Added the toolbar in the header:

<h3>Volunteer Interest Report</h3>
<h5><em>This is an at-a-glance report.  For more detail, view the Google spreadsheet.</em></h5>
<p>You can search all of the records by name or email here.</p>
 <input type="text" name="srch" placeholder="search...." class="form-control A" />
<br>
<input type="submit" name="submit" value="Submit" />
<p style="text-align: right;"> _TOOLBAR_NEW_</p>
_PAGINATOR_NAV_ 


Added an action called ' new ' . Under the form event I have ' formname:load '

Nothing happens when I click on the New button. What am I missing?
MainsailSoftware 28 May, 2015
The action event associated with the _TOOLBAR_NEW_ button is "edit".

Add your editing form reference in the "edit" action and clicking on the New button will present an empty form. Be sure the form's last Setup action is a "Connection Action" with the connection set to the name of the original connection, and the action set to "save". This will add a record to your table as the id field is empty. When _EDIT_ is used, the id is passed so the system performs an Update instead of an Insert.

If you need to have two different form; one for new and another for edit, you have to use your added "new" action and create a custom toolbar button.

I wrestled with this for a while too... wish there were better instructions available!
mduda 30 May, 2015
Thanks much!
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger