Created
September 25, 2013 01:58
-
-
Save kylejohnson/6694219 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <? | |
| App::uses('AppHelper', 'Viwe/Helper'); | |
| class BootstrapHelper extends AppHelper { | |
| public $helpers = array('Form'); | |
| public function makeInputWithHelp($fieldName, $options = array(), $helpText) { | |
| $input = $this->Form->input($fieldName, $options); | |
| return $input . '<span class="help-block">' . $helpText . '</span>'; | |
| } | |
| } | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php echo $this->Bootstrap->makeInputWithHelp('Name', null, 'I love lamp.'); ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="form-group"> | |
| <label class="control-label" for="MonitorName">Name</label> | |
| <div class="input text"> | |
| <input type="text" id="MonitorName" value="Shed" maxlength="64" class="form-control" name="data[Monitor][Name]"> | |
| </div> | |
| <span class="help-block">I love lamp.</span> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="form-group"> | |
| <label class="control-label" for="MonitorName">Name</label> | |
| <div class="input text"> | |
| <input type="text" id="MonitorName" value="Shed" maxlength="64" class="form-control" name="data[Monitor][Name]"> | |
| </div> | |
| </div> | |
| <span class="help-block">I love lamp.</span> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment