DateTextBox - value is not commited

View: New views
2 Messages — Rating Filter:   Alert me  

DateTextBox - value is not commited

by Kerstin-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm new with dojo and try to implement a datetextbox in a form.

It looks well but when I submit the form the value is not commited in
the POST-Variable.

When I replace the DateTextBox by a standard-Textbox with id="datum" it
works fine.

Any ideas?

Thanks in advance
Kerstin


Here's my PHP-code:
       
$out_cont .= '<form
action="index.php?module=anwesenheiten&action=view&id='.$id.'"
method="post" name="anwesenheiten">';
       
       $heute = date("Y-m-d");
          if(empty($datum)) {
                  $datum = $heute;
          }

          $out_cont .= '<input type="hidden" name="lg_id" value="'.$id.'">';
     $out_cont .= '<input type="text" id="datum" name="datum"
    value="'.$heute.'"
                   dojoType="dijit.form.DateTextBox"
                   promptMessage="Bitte Datum eintragen"
                   constraints="{max:\''.$heute.'\'}"
                      invalidMessage="Eingabe ungueltig! Bitte geben Sie das
Datum im Format TT.MM.JJJJ an."
                   required="true" />';
         $out_cont .= '<input type="submit">';
                $out_cont .= '</form>';

_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

Re: DateTextBox - value is not commited

by Kerstin-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Bill,
thanks a lot. There was a mistake in the generated HTML-code, confused
the form with a second form on the same page.

The firebug was new to me, great help for finding such mistakes!

Greetings
Kerstin


Bill Keese schrieb:

> Hmm, it looks OK to me, not sure why it isn't working.
>
> You can do a "view source" in your browser to make sure your PHP code
> generated the HTML you expected, and then in firebug make sure that
> inside the widget there's a hidden <input> field with name=datum set on it.
>
> IIRC there was a problem with this in the past, where we set name via
> dojo.attr() rather than at creation time, and IE didn't work right, but
> we fixed that.
>
> On Wed, Sep 9, 2009 at 8:27 PM, Kerstin <kfinke@...
> <mailto:kfinke@...>> wrote:
>
>     Hi,
>
>     I'm new with dojo and try to implement a datetextbox in a form.
>
>     It looks well but when I submit the form the value is not commited in
>     the POST-Variable.
>
>     When I replace the DateTextBox by a standard-Textbox with id="datum" it
>     works fine.
>
>     Any ideas?
>
>     Thanks in advance
>     Kerstin
>
>
>     Here's my PHP-code:
>
>     $out_cont .= '<form
>     action="index.php?module=anwesenheiten&action=view&id='.$id.'"
>     method="post" name="anwesenheiten">';
>
>           $heute = date("Y-m-d");
>              if(empty($datum)) {
>                      $datum = $heute;
>              }
>
>              $out_cont .= '<input type="hidden" name="lg_id"
>     value="'.$id.'">';
>              $out_cont .= '<input type="text" id="datum" name="datum"
>        value="'.$heute.'"
>                       dojoType="dijit.form.DateTextBox"
>                       promptMessage="Bitte Datum eintragen"
>                       constraints="{max:\''.$heute.'\'}"
>                          invalidMessage="Eingabe ungueltig! Bitte geben
>     Sie das
>     Datum im Format TT.MM.JJJJ an."
>                       required="true" />';
>             $out_cont .= '<input type="submit">';
>                    $out_cont .= '</form>';
>
>     _______________________________________________
>     FAQ: http://dojotoolkit.org/support/faq
>     Book: http://docs.dojocampus.org
>     Dojo-interest@...
>     <mailto:Dojo-interest@...>
>     http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://docs.dojocampus.org
> Dojo-interest@...
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest