[Typo3-dev] required form fields in FE from my own extension

Thomas Peterson Thomas.Peterson at t-online.de
Thu Jul 17 10:27:27 CEST 2003


Hello

> > I have make an extension with form fields.
> >
> > e.g. $content='<input name= ....
> >
> > How can I make it required in FE?
>
> You can
>
>     a) either use the cObj FORM to generate your form (see
ts_content.php),
> in that

I have seen in the Guestbook Code:

$lConf = $conf["postform."];
$content.=$cObj->FORM($lConf);

How can I use now with me?

My code is developed as follows:

<snip>
$content='
                     <p>Packet: '.t3lib_div::GPVar("test").'</p>
                     <p>Bitte gew&uuml;nschte Domain ohne www
eingeben:</p>
                    <form
action="'.$this->pi_getPageLink($this->cObj->data["tx_be_wsite"]).'"
method="POST">
                    <input type="hidden" name="no_cache" value="1">
                    <input type="hidden"
name="'.$this->prefixId.'[packet]"
value="'.t3lib_div::GPVar("test").'">
                    <input type="text"
name="'.$this->prefixId.'[input_field]"
value="'.htmlspecialchars($this->piVars["input_field"]).'">
                    <input type="submit"
name="'.$this->prefixId.'[submit_button]"
value="'.htmlspecialchars($this->pi_getLL("submit_button_label")).'"
>
                    </form>
                    <BR>


                   <P>Refresh: '.$this->pi_linkToPage("get to this
page again",$GLOBALS["TSFE"]->id).'</P>';

               return $this->pi_wrapInBaseClass($content);
</snap>


>     case you simply configure the form like in the backend (see
TSref)
>
>     b) or create the HTML for your form manually like you did and
take care
> of the
>     JavaScript evaluation yourself.
>
> Honestly, I don't really get what you intended with your question.
>






More information about the TYPO3-dev mailing list