Author Topic: cakePHP issue  (Read 689 times)

0 Members and 1 Guest are viewing this topic.

Offline devilincarnatedTopic starter

  • Irregular
  • Posts: 38
    • View Profile
cakePHP issue
« on: February 10, 2010, 07:55:45 AM »
i have created a dropdownlist of values in a view....now i want to do a rent projection based on the selected values in the drop down. the drop down has values startmonths, stopmonths......so if start months is set to june and stop months to aug i want a display say, jun jul aug.....so based on the value selected i want to call them in my new thtml view results file and display accordingly....i just want to know how to take those selected values from this dropdown?

can anyone help me out?

Offline jcombs_31

  • Guru
  • Addict
  • *
  • Posts: 2,426
    • View Profile
    • My Blog
Re: cakePHP issue
« Reply #1 on: February 13, 2010, 02:16:11 PM »
When you say drop down are you referring to a select box in a form?  If you submit the form, they will be in the data array.  If you want to pass values to a view, you have to use $this->set('name', $value).  You could just pass the data array and parse as necessary.  And what version of cake are you using, thtml pages are deprecated.

Offline devilincarnatedTopic starter

  • Irregular
  • Posts: 38
    • View Profile
Re: cakePHP issue
« Reply #2 on: February 15, 2010, 02:02:48 AM »

yes the select box of a form...

Quote
If you want to pass values to a view, you have to use $this->set('name', $value)

does that mean the selectbox value now has the value selected in name?

its a third party script...i have posted in it 2...here is the link....
http://www.phpfreaks.com/forums/index.php/topic,287522.0.html

here is a detailed explanation of my problem what i posted in the above link...if any doubts please revert back

cakePHP issue

i have created a dropdownlist of values in a view....now i want to do a rent projection based on the selected values in the drop down. the drop down has values startmonths,stopmonths......so based on the value selected i want to call them in my new thtml view results file and display accordingly....

can anyone help me out?
now the problem i face is since i have written an array for startmonths and stopmonths in a view file, i.e. .thtml file as requested by the client for rent projection for particular period and passed through js the values to the php function....it works fine now......but now he wants to change the appearance of the front end again....the problem is the arrays i created for start and stop months wont get received in any file.....how do i call them? they wont even print out the selected value of selectbox here....