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
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.
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?
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.
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?
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.
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.