Skip to content

Instantly share code, notes, and snippets.

@jamierumbelow
Created January 5, 2014 18:31
Show Gist options
  • Save jamierumbelow/8271983 to your computer and use it in GitHub Desktop.
Save jamierumbelow/8271983 to your computer and use it in GitHub Desktop.
Which do you prefer?
<?= Tuxedo::form($article, function($f){ ?>
<h2><?= $f->title ?></h2>
<?= $f->fieldset('Content', function($f){ ?>
<?= $f->text('title') ?>
<?= $f->textarea('body') ?>
<?php }); ?>
<?= $f->fieldset([ 'name' => 'Author', 'for' => 'author' ], function($f){ ?>
<?= $f->text('first_name') ?>
<?= $f->text('first_name') ?>
<?php }); ?>
<?= $f->fieldset('Metadata', function($f){ ?>
<?= $f->date_dropdown('publish_date') ?>
<?= $f->text('first_name') ?>
<?= $f->tokens('tags') ?>
<?php }); ?>
<?php }); ?>
<?= Tuxedo::open($article) ?>
<h2><?= Tuxedo::title() ?></h2>
<?= Tuxedo::openFieldset('Content') ?>
<?= Tuxedo::text('title') ?>
<?= Tuxedo::textarea('body') ?>
<?= Tuxedo::closeFieldset() ?>
<?= Tuxedo::openFieldset([ 'name' => 'Author', 'for' => 'author' ]) ?>
<?= Tuxedo::text('first_name') ?>
<?= Tuxedo::text('first_name') ?>
<?= Tuxedo::closeFieldset() ?>
<?= Tuxedo::openFieldset('Metadata') ?>
<?= Tuxedo::date_dropdown('publish_date') ?>
<?= Tuxedo::text('first_name') ?>
<?= Tuxedo::tokens('tags') ?>
<?= Tuxedo::closeFieldset() ?>
<?= Tuxedo::close() ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment