Tree View
Tree
List View
Alphabetical List
Share
Share
Search:
id:
1341

name:

Hidden Page Variable



description:
Qrimp has a special hidden HTML form field called "page" that allows you to configure where the user goes to after clicking a link, creating or saving records.

To modify the location the user goes to, Design > Design Mode ON. Go to the form from which you want to control where the user goes to after clicking the button.

Click the gear near the buttons. You'll find in that HTML a hidden INPUT form field called "page". You can change this variable to a URL that you'd like the user to go to after submitting the form. This URL can contain variables that are updated with values from the saved form you can also use square brackets to include SERVER variables like the HTTP_REFERER to send the user back to the page they were on when they clicked the edit or add new link.

Add a Create and Add Another button


Sometimes, you may want the ability to quickly create a lot of items at once. On the add new item screen (vid=8 in the url), you'll want to edit the header footer, add the button, and then when that button is clicked, change the value of the hidden page variable so that it sends the user back to the page you are on, rather than going to the detail view of the newly created item.

Here's how to do that. First, be sure design mode is on according to the instructions above. Then, go to the Add New form where you want to create many items quickly.

Click the gear next to the save buttons at the bottom. A lightbox will appear with the HTML for the Create and Cancel buttons. We'll add another button. To do that, copy the Text that starts with the Less than sign and INPUT type=submit. Select all of that text through to the Greater than sign. That's one HTML tag for the create button. Copy and paste it.

Change the value of the pasted INPUT button to "Create and Add Another". You'll need to have all of that text including the quotes so your browser knows to include all of it on the button. Now, we need to add another attribute to the input tag that changes the hidden PAGE variable. Add onclick='$("#page").val(document.location.href);' somewhere inside the newly copy/pasted INPUT field.

Next, add an attribute to the HIDDEN page variable that we can use to tell JavaScript which input value to update. Just add id="page" inside the HTML tag for the hidden input variable named page.

Your new HTML inside the lightbox should look like what is in the TEXTAREA below. In most cases, you can probably just copy/paste this HTML into your lightbox area to get the results we've described here.



Click save. Now you can click the "Create and Add Another" button to quickly add a lot of items to the same table.








ParentTopic:
 

go to page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ... 243 records. Showing