Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
4129 Lượt xem

Greetings,

If I want to show for example selections to the user that are not part of the model shown by the view, how can I save the user's selection and send it back to the server upon saving?


Is there a way to do it without using computed fields?


Thank you

Ảnh đại diện
Huỷ bỏ

can you please more explain, what you want to do?

Tác giả Câu trả lời hay nhất

Hi,

I have a list of courses that I want the user to mark as either ALEAEDY STUDIED, NEED TO STUDY or CAN TEACH using for example radio buttons or a drop down list. However, I do not need to store the user selection in each course model. Rather, I need to take different course of actions in the server side depending on the value selected for each course when submitted. In other words, the selections are not related to the model but rather to the form but I will take action in the server based on them without really storing them in the database.

Any clue how I can achieve this? maybe through context?

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 3 15
5957
2
thg 9 23
9121
1
thg 9 23
3316
2
thg 3 22
7338
1
thg 11 19
8003