Dynamic dropdown list

I have had some really amazing help on these forums but need some help again.

This is a link Form to a two page form which after amounts are entered into the boxes on page 1 they should pull through to page two so as to populate a drop down list for use in further calculations. (At least that’s the plan) Except somehow I can’t get it to work. Can someone tell me what I have done wrong please? 'm pretty sure the form action is wrong as it doesn’t find page two

Thanks in advance.

What is the correct link to page two?

Hi Paul, thanks for replying. In the folder there are two files;

my page 1 = Stylists_form_page_0.txt
my page 2 = Stylists_form_page_1.txt

I assumed changing the form action to the page two address would work but no joy.

Those don’t look to be HTML files.

Hi Paul, thanks.
its back to the form maker again. It generates the php page and somehow displays those text templates that are in the folder in that page.
This is one I built manually and built 2 .php pages so that they would fit back into the form.
Which is how I reckoned to put that form action in.


Well there’s nothing we can do in terms of JavaScript until the backend is working and things like pages are accessible.

Thanks Paul,
this is the folder structure of the forms when published. (Perhaps I have put in wrong section of forum?)

And this is inside the templ folder

That’s all a mystery to me. I recommend that you gain the assistance of backend people that know how to help with that. Potentially, in the PHP forum.

1 Like

Paul, given the excellent help yourself and Russell have given me with the other form, do you think I am wasting my time with the form builder and should be trying to learn Vanilla JS?

1 Like

I think that it’s worth exploring the form builder further, and we’re here if you want to further things with JavaScript.

1 Like

Thread moved.

Your action has a leading /, which doesn’t tie in with the destination file being inside a folder, unless the templ folder is also the virtual root folder.

In your other example the destination specified by action is named .php, why can’t you do the same on this one? The problem is that, unless the configuration is changed, your web server won’t process any PHP code unless the extension is .php.

Hi droopsnoot, thanks for replying.

I am limited with what I can do because I built the pages with a form maker (but not in the 2nd example it was just pasted in to two pages which gave me the freedom to name it .php)

I posted a cut down version of the form in question as the original has 6 pages (I need to get that info from page 5 to page 6) but because the form validates inputs I didn’t want to annoy you guys with it.

I think somehow the .php file is calling those .txt pages when required as the page remains the same but the content changes to the next .txt file. I can let you see the actual form if easier?

Guys please ignore this thread, I have decided to attack the matter from a different angle.
Thanks. Happy for admin to delete the thread. :slight_smile:

Just to chime in. There is no reason to go from page to page as a page can display anything. You can have 100 questions on a page shown 5 at a time or whatever way you wish. Use post as the form method and action pointing back to the same page. With each submit, check if the input has been filled as required and if it has this input (or this group of 5) can be posted back to hidden inputs and the next set of inputs are shown. It’s rather simple to calculate the number of “pages” and keep track of where you are at e.g. 2 of 10 pages. If the goal is to total up all inputs that can be easily done and shown as a running total or at the end. This also can be made much more dynamic rather then hard coding each question but that’s another matter.

1 Like

Thanks Drummin. I’d be keen to learn more about that. I think that the code I managed to find works fine on normal pages in the way that I already had it working but getting it to work in the form maker environment was just proving too difficult at that time. :slight_smile: