302 Found

Found

The document has moved here.

Knowledge Base

Our Knowledge Base covers a wide variety of technical topics, from the basic to the complex.

How can I create an Add Record form that gives users a choice of different forms to use when adding records to a table?

The way to do this is to create a new Add Record form for your table that will act as a 'dashboard' for users to select different forms for adding a record. This dashboard form will be unlike other Add Record forms in your table since it will not actually have any of the usual fields from your table on it.

1) The first thing to do is create all of the different forms you want to give users the option of using when adding a record to the table. Remember that forms can be formatted very differently and fields can be set to be required or read-only on one form, and not on others.

For more reading on creating custom forms, please our About Custom Forms help topic.

2) Before you create a dashboard form, you'll need to add a new Checkbox field to your table and call it 'Prevent Save.'

For more information on adding fields to your application please see our What Is a Field? help topic.

3) Now that you've created the [Prevent Save] field, you can create another form to act as the dashboard. This form will only have one actual field from your table on it. It will be the [Prevent Save] field and you will need to set the form element properties of this field to be Required AND Read-Only. By adding this field to your dashboard form with the preceding settings, users will not be able to save a record to the table from the dashboard. They will be forced to use one of the other 'official' Add Record forms that you've already created.

4) The other element on the dashboard form will be a Text element formatted as limited HTML. You'll use this element to create HTML buttons that will send users to the other forms you want them to use. Some sample HTML is included below, but you can modify the HTML as you desire. The following example will provide two buttons that users can choose between. Adjust your HTML according to your needs.

<TABLE>
<TH align="center" style="color:Darkorange">
  <B>Select an "Add Record" Form</B>
</TH>
<TR><TD>
  <A class="stdButton" HREF="account URL/db/XXXXXXXXX?a=GenNewRecord&dfid=YY">
  <B>Add New Type A Record </B></A>
</TD></TR>
<TR><TD>
<A class="stdButton" HREF="account URL/db/XXXXXXXXX?a=GenNewRecord&dfid=YY">
  <B>Add New Type B Record </B></A>
</TD></TR>
</TABLE>

You will need to insert information from your application into the sample HTML to complete the process. "account URL" must be replaced with the specific URL you use to log into your company's QuickBase, which looks like:

https://mycompany.quickbase.com

The XXXXXXXXX must be replaced with the Table ID (dbid) of the table in question. Each table in your application had a unique ID. See here for information about finding the dbid of your table: http://quickbase.intuit.com/developer/node/2106. The YY must be replaced with the Form ID (dfid) of the forms you want to send your users to for adding records. Each QuickBase form has a unique ID that is referenced as the dfid. See here for information about finding the dfid of your forms: http://quickbase.intuit.com/developer/node/2089.

5) Finally, you will need to customize the form usage for this table so that all users adding a record will be presented with the "dashboard" form you've created. See our Associate a Custom Form with Roles help topic for more information. Set your new dashboard form as the form to be used when ADDING records to the table. This can be set per role or as the default form for all users.

Comments

RE: Good solution but it doesn't work

Hi Jake,

 

The Text section HTML should be working on your form, so if you are getting an error the best thing to do is to go to Help >Manage Support Cases, and enter a case about it. That way one of our customer care reps will be able to take a look at the setup in your specific app to see what's going on there.

 

Thanks,

Brian

Good solution but it doesn't work

Code doesn't work. Returns an error message that says there's an HTML tag in use that's not allowed but it works fine in a browser.

Post new comment

The content of this field is kept private and will not be shown publicly.
Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.
302 Found

Found

The document has moved here.