Git Product home page Git Product logo

Comments (7)

qzminski avatar qzminski commented on August 29, 2024

@Toflar, what do you think?

from contao-haste.

Toflar avatar Toflar commented on August 29, 2024

Honestly, I have no idea. I don't know by heart what happens if a form action is page.html?something=yes and I submit new fields. If it does page.html?something=yes&myformparam=yes automatically, then we need an option to tell HasteForm to kill all existing GET-params on request. If however existing GET-params are killed anyway, we need an option to tell HasteForm to keep existing GET-params (via hidden-inputs).

from contao-haste.

aschempp avatar aschempp commented on August 29, 2024

existing GET parameters are killed if you use that URL as action. Therefore, IF I pass any parameters, THEN they should automatically be kept.

from contao-haste.

Toflar avatar Toflar commented on August 29, 2024

I prefer

$objForm::preserveGetParams();

So one can set whatever action he wants and if this method is called, they're preserved. If we do it like Andy proposed, they're always passed even if I don't want them to be (which means I have to do preg_replace() on my action to remove them :-))

from contao-haste.

qzminski avatar qzminski commented on August 29, 2024

Gents, can you have a quick look at this fedbc68? I have moved parsing the "action" parameter to the __get() method, which allows now to e.g. set the action URL before setting the form method. Also, now with GET method the URL paraams are automatically passed to the hidden fields. They can be still altered by getting and setting the $this->hiddenFields.

from contao-haste.

Toflar avatar Toflar commented on August 29, 2024

Looks good to me!

from contao-haste.

aschempp avatar aschempp commented on August 29, 2024

I have no idea what you did, but I'm sure it's good :P

from contao-haste.

Related Issues (20)

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.