We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

[Answered] how we can add date of birth in a plugin by select feild or by calender? | Forum

suchita jain
suchita jain May 20 '15
i want to add date in form
The Forum post is edited by Alia May 22 '15
ross Team
ross May 20 '15
Topic was moved from Bug reports and troubleshooting.
Alia Team
Alia May 22 '15
I recommend checking "Forms" section of "Skeleton" plugin.

To add date type of field, your code should look like:

1. Controller.
         $form->getElement("dateselect");
   

2. Classes
        $foo = new AgeRange("dateselect");
        $selectField->setLabel($language->text("pluginprefix", "text_key_here"));
         $this->addElement( $foo);

3. Views.
<tr class="ow_alt1">
                    <td class="ow_label">
                        {label name="dateselect"}
                    </td>
                    <td class="ow_value">
                        {input name="dateselect"}
                    </td>
                    <td class="ow_desc ow_small">
                        &nbsp;
                    </td>
            </tr>


Note: all form elements are described on ow_core/form_element.php file.