user3894236
user3894236

Reputation: 114

get value from one view & set it on element in another view in yii

I have a view file called "user" .There it has a select tag called 'uid'.I will select a user id from the select tag and click on 'add' button.When I click 'add' button it will redirect to another view called 'projects' . There I have a select tag called 'userID' I want to set the value of this option to 'uid' which I have selected in 'user' view. How can I do this?

I don't want to pass the variable in url

Upvotes: 0

Views: 58

Answers (1)

Rajesh
Rajesh

Reputation: 24915

I have never worked on PHP but you can try one of the following options:

  1. You can pass that value in URL and access it on project view.

    eg: /project/uid=1001

  2. Use can store on client side using Local Storage or Session Storage. http://www.gwtproject.org/doc/latest/DevGuideHtml5Storage.html

You can also use Route Parameters:

Use following link: http://www.yiiframework.com/doc/guide/1.1/en/topics.url

Hope this might

Upvotes: 1

Related Questions