"Some Value 1", "ans."/> "Some Value 1", "ans."/> "Some Value 1", "ans"/>
خرید بک لینک

Vote count: 0

I have dynamic number of questions and answers. I use DynamicModel() for collecting these data.

$attributes = [
      "answer_1" => "Some Value 1",
      "answer_2" => "Some Value 2",
      "answer_3" => "Some Value 3",
      .....
]

$customFormModel = new DynamicModel($attributes);

I also have

$labels = [
      "answer_1" => "Label 1",
      "answer_2" => "Label 2",
      "answer_3" => "Label 3",
      .....         
]

I just can't get the $label array to be set as Label Attributes for my Dynamic Model. My $customFormModel->attributeLabels() is always empty.

These results with the following issue. I get error messages like these

Answer 1 can not be blank
Answer 2 can not be blank
Answer 3 can not be blank

What I want instead

Label 1 can not be blank
Label 2 can not be blank
Label 3 can not be blank

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 10 مرداد 1395 ساعت: 18:35

صفحه بندی