Yii Framework Small Object check box value problem ask for advice.

Source: Internet
Author: User
I want to pass the value of the page check box to a method of the controller, how should it be implemented? Do you need to use small objects? Ajax, JS How to achieve AH? Help, Boys.
, I want to select all, or select some, and then pass the value to a method to do the next step.

Although the value can be passed to the controller using small objects, it can only be passed to the current method
So here's the problem.
If my select () method is to view all the data, but if I want to pass the data that I have seen to other methods, how can I pass it over?
Kneel down.

I think of the method is to pass the value to the current method, and then from this method to pass the received value to other methods to operate.
But I think there should be a way to choose the way to do the operation, but beginners do not understand.


Reply to discussion (solution)

Puzzled. You get $a=yii::app ()->request->getpost (' name ') directly in the Actionaction () {} method in the background when you submit the action;
$a = array ()//The value is a number of groups.

1
2
What does that have to do with your frame?
You also need to assign a value to the widget before it is displayed. First figure out what you're going to do. function in the question, I literally understand the meaning, you are the Submit check box, background to get the value just!

Puzzled. You get $a=yii::app ()->request->getpost (' name ') directly in the Actionaction () {} method in the background when you submit the action;
$a = array ()//The value is a number of groups.

1
2
What does that have to do with your frame?
You also need to assign a value to the widget before it is displayed. First figure out what you're going to do. function in the question, I literally understand the meaning, you are the Submit check box, background to get the value just!


Oh my God! I am stupid, I understand how to do, thank you for your answer AH!!!
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.