Problém s formůlářem s designem css
Upozornění: Tohle vlákno je hodně staré a informace nemusí být platné pro současné Nette.

- zuhla
 - Člen | 33
 
Dobrý den, mám kontaktní formulář a chtěl bych ho dosadit do html (css) designu.
V html
<form id="contacts-form" action="">
									<fieldset>
									<div class="field"><label>Your Name:</label><input type="text" value=""/></div>
									<div class="field"><label>Your E-mail:</label><input type="text" value=""/></div>
									<div class="field"><label>Your Website:</label><input type="text" value=""/></div>
									<div class="field"><label>Your Message:</label><textarea cols="1" rows="1"></textarea></div>
									<div class="alignright"><a href="#" onclick="document.getElementById('contacts-form').submit()">Send Your Message!<b></b></a></div>
									</fieldset>
								</form>
Úprava kodu:
<form id="contacts-form" action="">
									<fieldset>
			{widget contactForm}
									</fieldset>
								</form>
Formulář se vykreslí, ale nemá žádnou akci. Na foře jsem to nikde nenašel a nevěděl jsem jestli zařadit do kategorie formuláře, nebo Nette/Application mezi šablony.
Děkuji všem za rady.

- zuhla
 - Člen | 33
 
Přidal jsem to tam
public function createComponentContactForm()
    {
        $form = new AppForm();
        $form->addText('name','Jméno a příjmení')
             ->addRule(Form::FILLED, 'Musíte vyplnit jméno.');
        $form->addText('email','Váš e-mail')
             ->addRule(Form::EMAIL,'Zadejte platný email.');
        $form->addText('subject','Předmět')
             ->addRule(Form::FILLED,'Zadejte předmět zprávy.');
        $form->addTextArea('text','Zpráva')
             ->addRule(Form::FILLED,'Zadejte text zprávy.');
        $form->addCaptcha('captcha')
             ->addRule(Form::FILLED, "Rewrite text from image.")
             ->addRule($form["captcha"]->getValidator(), 'Try it again.')
             ->setFontSize(25)
             ->setLength(10) //word length
             ->setTextMargin(20) //px, set text margin on left and rigth side
             ->setTextColor(Image::rgb(0,0,0)) //array("red" => 0-255, "green" => 0-255, "blue" => 0-255)
             ->setBackgroundColor(Image::rgb(240,240,240)) //array("red" => 0-255, "green" => 0-255, "blue" => 0-255)
             ->setImageHeight(50) //px, if not set (0), image height will be generated by font size
             ->setImageWidth(0) //px, if not set (0), image width will be generated by font size
             ->setExpire(10) //ms, set expiration time to seession
             ->setFilterSmooth(false) //int or false (disable)
             ->setFilterContrast(false);  //int or false (disable);
        $form->getControlPrototype()->id('contacts-form');
        $form->addSubmit('send','Odeslat');
        $form->addSubmit('cancel','Zrušit');
        $form->onSubmit [] = array ($this, 'send');
        return $form;
    }
Ale hodí to chybu:
Call to undefined method AppForm::getControlPrototype().