Code Monkey home page Code Monkey logo

Comments (9)

thehammer avatar thehammer commented on August 15, 2024

Hi foresto,

The required format of the parameter names apply only to the "name" attribute of the fields. The "id" attribute can be whatever format you prefer. Only the name and value attributes are used when the form is posted.

If the specific web form library you're using doesn't provide an easy way to specify the form element name separate from the id, we'd definitely be interested in learning more details. We're always interested in making the integration experience as easy as possible and feedback like this is very helpful.

Hammer
Braintree Developer

from braintree_python.

foresto avatar foresto commented on August 15, 2024

Yes, I understand that the "id" attribute doesn't affect Braintree's server.

My point is that, in modern web development, the "name" attribute affects more than just the html and the data that gets posted to a server. A lot of people use web toolkits to simplify / automate form handling, and some of the ways those toolkits make our lives easier rely on "name" attributes being shared with "id" and "for" attributes in the HTML, as well as native class attributes and variables in the programming language that fills the templates. By requiring square brackets in the "name" attribute, Braintree effectively forces programmers to abandon their form toolkits or else (sometimes extensively) rewrite form handling code that would otherwise be automated.

I never claimed that working with Braintree's naming convention was impossible. It's just time consuming, fiddly, error prone, and generally irritating. The opposite of elegant, if you will. If you allowed a more widely-compatible naming convention like the one I suggested, our programmers could spend their time on more productive things.

from braintree_python.

foresto avatar foresto commented on August 15, 2024

It's probably worth noting that at least one of your competitors who offer functionality similar to Transparent Redirects use an underscore to delimit subfields within "name" attributes. (Similar to what I suggested in my bug report here.) I have no doubt that they chose this approach for maximum compatibility.

from braintree_python.

foresto avatar foresto commented on August 15, 2024

I see that this issue is now marked as "closed", yet it has not been addressed. You seem to have misunderstood the second use case in my report, and completely ignored the first.

from braintree_python.

 avatar commented on August 15, 2024

Closing was accidental, reopening.

from braintree_python.

braintreeps avatar braintreeps commented on August 15, 2024

We'll be releasing support for using double underscores this week.

from braintree_python.

foresto avatar foresto commented on August 15, 2024

Hooray! This will allow our Braintree form code to work like all the other form code in our system, rather than re-implementing library functionality in bizarre ways and requiring special knowledge to avoid breaking.

from braintree_python.

foresto avatar foresto commented on August 15, 2024

I just got a chance to try the new syntax, and it seems to be working quite nicely. Thank you! I hope to incorporate it into our integration code soon. Any chance it will find its way into a future rev of the documentation?

from braintree_python.

foresto avatar foresto commented on August 15, 2024

On a more personal note, I'm sorry about the strident tone of my earlier message. I had only intended to clarify the nature of the problem I was reporting, and upon rereading, I see it came out a bit harsh. For the record, you folks have been doing an outstanding job of addressing issues as they arise. I'll mind my phrasing next time.

from braintree_python.

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.