Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Names of HTML form naming conventions

In Rails and CakePHP1.2, forms tend to include input elements with names like the following:

<input name="comment[author]" />

Is there a formal name for the notation used in the "name" attribute?

Likewise, in CakePHP1.1 I do believe that the same would have looked like this:

<input name="comment/author" />

Again, is there a formal name for the notation used in the "name" attribute?

like image 307
Richard JP Le Guen Avatar asked Jan 26 '10 20:01

Richard JP Le Guen


1 Answers

In Rails, this is referred to as the forms microformat (at least by some). Lots of different frameworks seem to be standardizing on that first format. I'd imagine CakePHP has updated their libraries to conform to that standard. There's an obsessively in-depth explanation available that's only somewhat Rails-specific. The original microformat apparently comes from PHP.

like image 170
Emily Avatar answered Sep 28 '22 06:09

Emily