Last active
December 19, 2015 17:19
-
-
Save bazo/5990343 to your computer and use it in GitHub Desktop.
nette form bug
This file contains 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
<form class="ajax" id="frm-formNewMessage" method="post" action="/translation/default/51e0996cb0d02a1425000003"> <label for="frm-formNewMessage-context">Context</label> | |
<input type="text" value="" id="frm-formNewMessage-context" name="context"> | |
<label for="frm-formNewMessage-singular">Singular</label> | |
<input type="text" value="" data-nette-rules="[{"op":":filled","msg":"Please complete mandatory field."}]" required="" id="frm-formNewMessage-singular" name="singular"> | |
<label for="frm-formNewMessage-plural">Plural</label> | |
<input type="text" value="" id="frm-formNewMessage-plural" name="plural"> | |
<input type="submit" class="btn btn-primary" value="Add" name="btnSubmit"> | |
<div><input type="hidden" value="formNewMessage-submit" name="do"></div> | |
</form> |
This file contains 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
{form formNewMessage class => "ajax"} | |
{label context /} | |
{input context} | |
{label singular /} | |
{input singular} | |
{label plural /} | |
{input plural} | |
{input btnSubmit class => "btn btn-primary"} | |
{/form} |
This file contains 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
use Nette\Application\UI\Form; | |
protected function createComponentFormNewMessage() | |
{ | |
$form = new Form; | |
$form->addText('context', 'Context'); | |
$form->addText('singular', 'Singular')->setRequired(); | |
$form->addText('plural', 'Plural'); | |
$form->addSubmit('btnSubmit', 'Add'); | |
$form->onSuccess[] = callback($this, 'formNewMessageSubmitted'); | |
return $form; | |
} |
This file contains 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
<form id="frm-formNewMessage" method="post" action="/translation/default/51e0996cb0d02a1425000003"> | |
<label for="frm-formNewMessage-context">Context</label> | |
<input type="text" value="" id="frm-formNewMessage-context" name="context"> | |
<label for="frm-formNewMessage-singular">Singular</label> | |
<input type="text" value="" data-nette-rules="[{"op":":filled","msg":"Please complete mandatory field."}]" required="" id="frm-formNewMessage-singular" name="singular"> | |
<label for="frm-formNewMessage-plural">Plural</label> | |
<input type="text" value="" id="frm-formNewMessage-plural" name="plural"> | |
<input type="submit" class="btn btn-primary" value="Add" name="btnSubmit"> | |
</form> |
This file contains 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
<form n:form="formNewMessage" class="ajax"> | |
{label context /} | |
{input context} | |
{label singular /} | |
{input singular} | |
{label plural /} | |
{input plural} | |
{input btnSubmit class => "btn btn-primary"} | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment