Conditional Region surrounding form section with validation

what technology are you using PHP/ Node?

Iā€™m using PHP

Then probably the hide/ show would look better visually as it would not require a page reload. Name each section with a unique ID and use a browser.goto(ā€˜page#idā€™) in the success event to move from section to section so their is no page reload.
Depends if you are happy with seeing a page re-load between each stage I suppose

If it was node i would have said you could use separate content pages as their would only be a content reload, not a full page

Ok thanks. Iā€™m sure youā€™d say your preference would be node but unfortunately I have no experience with node, So unique ID to sections and browser.goto method sounds best as the least amount of page re-load the better I think.

To be honest, with Wappler there is not a lot of difference compared with an PHP SPA. Node drives the server side which is all managed via Wappler just as it is with PHP. no need to write any node code.
Fire up a node server running on docker local and have a play, no need for a production target to learn about it
Main differences are you have Layouts (templates) which are basically the head of the page, content pages which are basically the body of the page and then partials which are just like an SSI/PHP include in terms of functionā€¦
I am working on a new video series now and it will all be based on node

Can I just check that the inputs in a repeat is this whatā€™s surrounded by a condition region? and this wonā€™t validate?

Sorry theres lots of posts here hope I didnā€™t lose track

The reason iā€™m asking this is because sometimes the conditional region is not included in the data bind and is needed. example it may become something like:

formname1.conditionalid1.inputname1.validate()

but when using the picker the condition id is left out at times so youā€™d need to go into code view and add it manually, this is just something to try.

Just put together a little demo of this to explain this in more detail:

This is the forms structure as you can see text1 is inside a conditional region (the condition is text2.value == 5):

Now when we use a onclick on the button and choose to validate both inputs we get this:

In code view I added the conditions id infront of text1 on the second button:

This results in this:

Thanks Brian @Hyperbytes Iā€™ll definitely have a look at node workflow within wappler and will be very interested in seeing your video series. I did take a look at Docker a while back when I first became aware of it after downloading Wappler. It just seemed alien to me but maybe its just the fear of the unknown. which I remember having when I first entered development from a design background. Always up for adding strings to the bow.

Thanks for this @Sorry_Duhā€¦ Will take a look at this and try it out. :+1:

Docker simplifies node setup as it deals with server configuration as well but is not essential. I actually use, by preference, a VPS rather than docker and good old fashioned FTP

Hi Brian. So iā€™m back on this wretched form. Iā€™ve decided to go with posting each section. Consequently Iā€™ve converted each section into separate forms on the same page. Iā€™ve given them each unique IDā€™s and they each have their own Data insert into the database.

Iā€™ve added a success event to the form with a browser.goto ( see screen shot )

What iā€™m not sure of is how to incorporate Show/Hide to each form so only the correct form shows at any given time. How do I associate it with the goto url with the ID parameter?

Thanks in advance

@wappler_ambassadors if anyone else can help on this itā€™s much appreciated.

Just t create some variables to act as toggles to manage a show property and manage their values in the form success events by changing the value of the relevant variables

Thanks for this @Hyperbytesā€¦ but iā€™m just not sure how to set this up. Iā€™ll give it a go but to be honest I think iā€™m out of my depth here and iā€™m waisting to much time trying to develop this whilst on the Wappler learning curve. Seriously thinking about heading back to DW and Web Assist. :tired_face:

Hey @Steven_Joiner can I just ask what couldnā€™t you get working with the old setup was it still the validation in the conditional region. Did you try my suggestion?

Also if you do this as separate forms with nothing like session or local storage a user might submit say 2 forms and then leave the page etc (this depends on the user base was just highlighting)

Hi @Sorry_Duh after overcoming the validation issues, incidentally thanks for your help and your suggestions worked fine. But I was then presented issues with the action on submit from the last step which re-directed to another page with another form. I needed to then to pass the id from a data insert on the previous page to a data query on the redirected page. But again it wasnā€™t straight forward. It started to become frustrating as the support, which is very much appreciated, wasnā€™t giving me solutions. These are all simple tasks or me using DW and other plugins. So for now I think its best I revert back to that for these particular tasks. And just use wappler for font end dev which iā€™m fine with. Once again thanks for your help!