Git Product home page Git Product logo

Comments (11)

Toflar avatar Toflar commented on August 29, 2024

They are already, no?

from contao-haste.

qzminski avatar qzminski commented on August 29, 2024

I don't think so.

https://github.com/codefog/contao-haste/blob/master/library/Haste/Form/Form.php

from contao-haste.

Toflar avatar Toflar commented on August 29, 2024

https://github.com/codefog/contao-haste/blob/master/library/Haste/Form/Form.php#L755-L762

https://github.com/contao/core/blob/master/system/modules/core/templates/forms/form.html5#L12

from contao-haste.

qzminski avatar qzminski commented on August 29, 2024

But they are only available in the default form.html5 template, not when using e.g. addToTemplate() method.

from contao-haste.

Toflar avatar Toflar commented on August 29, 2024

You have the same variables available and the token is an inserttag just like in the form template?

from contao-haste.

qzminski avatar qzminski commented on August 29, 2024

That's true but I thought about this use case:

// module
$objForm->addDefaultFields();
$objForm->addToTemplate($this->Template);

// template
<form>
<?php echo $this->hidden; ?>
</form>

If there's already the variable for hidden fields then why would I need to hardcode some of them?

from contao-haste.

Toflar avatar Toflar commented on August 29, 2024

Ah, just like adding the captcha you mean? :)
I'd prefer to name the method something like addContaoFormFields then :)

from contao-haste.

qzminski avatar qzminski commented on August 29, 2024

Yes, exactly like captcha :-) haven't thought about that example but it's almost the same.

Or maybe addContaoHiddenFields()?

from contao-haste.

Toflar avatar Toflar commented on August 29, 2024

Fine for me too :) I just didn’t like „default“ :)

from contao-haste.

qzminski avatar qzminski commented on August 29, 2024

Shur 👍

from contao-haste.

qzminski avatar qzminski commented on August 29, 2024

Implemented in b67afdf.

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.