Giter Site home page Giter Site logo

Multiple Forms about grav-plugin-sqlite HOT 4 CLOSED

finanalyst avatar finanalyst commented on August 23, 2024
Multiple Forms

from grav-plugin-sqlite.

Comments (4)

finanalyst avatar finanalyst commented on August 23, 2024

I use multiple forms all the time with this plugin. Try looking at mgc.1ptd.com which is built using Grav, the sqlite plugin, datatables (another Grav plugin I wrote), multiple forms. Click on a hiker in the table, that sets up a field that is then used to interrogate an sqlite database. On the same page is a table to select the type of map being used. In fact, most of the plugins I wrote are related to websites I have created.

In order to get these more complex effects, you need to include some javascript and sql programming.

If you could be a bit more specific about what you want, I might be able to answer you in a way that is helpful. Also if you were to ask on the discuss forum, the question/answer might help others.

Regarding the blueprint question. I like to make things as generic as possible. However, there is a real problem about what is intuitive. How exactly do you think a blueprint for multiple forms should work? I'm genuinely curious. If you could suggest a User Interface that would solve your specific problem and could be abstracted into something that is generic for others, then I would love to try to implement it.

from grav-plugin-sqlite.

dlannan avatar dlannan commented on August 23, 2024

Hi, thanks for the response. Im referring to the use of the multiple forms support that the forms plugin uses, so in the blueprint you have like suggested in the forms documentation:
https://learn.getgrav.org/forms/forms - see Multiple forms section.
This is what I have been trying to use unsuccessfully.
Ive created my own sqlite twig extensions to allow me to do more complex behaviours anyway so I could move forward.

from grav-plugin-sqlite.

finanalyst avatar finanalyst commented on August 23, 2024

I have put some working code up on the Grav forum to show how I did it. See multiple forms etc

from grav-plugin-sqlite.

finanalyst avatar finanalyst commented on August 23, 2024

@dlannan , I wrote up the Grav forum item as you were answering me. The link is above. I have used the multiple forms feature in the code linked to. There is some twig on the page, but only to conditionally show / not show a form.

Although the multiple forms in the code example are created within the default.md (note it is not a form.md file) for the page itself, I have put forms in another page as discussed in the Forms plugin documentation. But I found that by keeping the form definition on the same page made it easier to understand the other code.

Hope this helps. Let me know if you were expecting some other behaviour.

from grav-plugin-sqlite.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.