Forum

Thread tagged as: Addons, Runway, Forms

Form app questions

Hi

Long time Perch user, first time Form app user... and I have a few questions;

  1. Is it correct that you need to submit a test entry through the form before it shows in the admin allowing you to change the settings of the form?

  2. I'm using Runway and have a master (offers.php) that seasonal offer pages will be created from... each requiring at times a different form template. I've noticed that when the form is submitted and shows in the admin, the form id/name is taken from the master page name rather than the name of the page you've created... meaning if I create 10 pages from this master, the forms will all have the same name. Is this correct, or am I doing something wrong?

Thanks Wayne

Wayne Hooper

Wayne Hooper 6 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Is it correct that you need to submit a test entry through the form before it shows in the admin allowing you to change the settings of the form?

Yes, that's how it works. The same as creating a new region on the page.

I'm using Runway and have a master (offers.php) that seasonal offer pages will be created from... each requiring at times a different form template. I've noticed that when the form is submitted and shows in the admin, the form id/name is taken from the master page name rather than the name of the page you've created... meaning if I create 10 pages from this master, the forms will all have the same name. Is this correct, or am I doing something wrong?

That's correct - it's the same form on multiple pages.

Thanks Drew

Missed the bit right at the top of the Form Options page where I can rename it...

Ah, I see what you mean about all pages from a master using the same form. I renamed the form after the creating the first page and when I added the second page and submitted the form it goes in the same form. Is there any other way of trying to achieve separate forms using the same master?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Forms are keyed on the ID, so if they have the same ID they're the same form.

What are you using the forms for?

They will be offer pages for a cosmetic clinic, so for example, when valentines day, mothers day, fathers day etc., are approaching, they would like to create a page from the offers master, but select from a list of form templates to suit the data they would require for that offer (certain offers may require an additional field or two).

Drew McLellan

Drew McLellan 2638 points
Perch Support

It sounds like you'd either be able to use a content region or a page attribute to let the editor pick which form template to use. Then use that value for the template option in your perch_form() call.

Thanks Drew. I'll check that out...

Using the content region option, its easy to specify which form to use on the page, but on testing a different form it still ends up in the same form in the admin.

These are the steps I've done;

  1. Creating a page from the master offers.php and calling it Christmas
  2. Selecting the template christmas_form.html for the form - Testing the form.
  3. In admin, the form Offers is there with the entry.
  4. Creating a page from the master offers.php and calling it Valentines Day
  5. Selecting the template valentines_form.html for the form - Testing the form.

In admin the entry is in the original Offers form, so both entries are in the same form.

I'm guessing from your original response and going through these steps, its not going to be possible to end up with a Christmas form and Valentines form in the admin with their own entries?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Do the forms have different IDs?

Ah... when I saw the form name in the admin, I thought it was taking that from the page. I've now changed the IDs in the template and they are separate in the admin.

Thanks