This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

[CODE HELP] drop down list equal another on change

This is for discussion, mainly on 1.x but there's some 2.x topics here too.

[CODE HELP] drop down list equal another on change

by carden » Thu Nov 20, 2014 9:51 pm

I am trying to make one drop down list equal another drop down list on change. I have both defaults set the same. I am new to symfony. I am just trying to help a friend out. I got most the changes made, mainly setting default values, fixing date formats, and retrieving ID#s from the database.

The last part I've worked on for awhile, I've been googling and researching and can't find an accurate solution.

I have two date field drop down lists.

Code: Select all
    $this->setDefault('date', date('d-m-Y', time()));
    $this->setDefault('available_start_time', "12-12-2012 12:12");
    $this->setDefault('available_end_time', date('d-m-Y H:i', time()));
    $this->setDefault('purchasable_end_time', date('d-m-Y H:i', time()));
    $this->setDefault('publish_time', date('d-m-Y H:i', time()));
    $this->setDefault('is_free', "0");



The available end time if the date value is changed, I want to set the purchasable end time to the same value.

I am not real sure how to do this though. Any help is appreciated.
carden
Junior Member
 
Posts: 2
Joined: Thu Nov 20, 2014 9:33 pm