콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
2270 화면

hi all,

in below code i want to have another field " active " with <option t-esc="zone.name" how it can be done with its Display value  like:  value stored in db is " active " the display value is " Active " when user click in it to select a Zone, it should display zone + active as below:

ZoneNameA....[ Active ]

ZoneNameB....[ InActive ]

etc.

                <div class="form-group field-zone_id">
                    <label for="zone_id" class="control-label">Your Zone</label>
                    <select name="zone_id" class="form-control link-style">
                        <t t-foreach="zone_rec" t-as="zone">
                            <option t-esc="zone.name" t-att-value="zone.id"/>
                        </t>
                    </select>
                </div>

regards

아바타
취소
작성자 베스트 답변

it has been done, modified code is here ( refer to my question above for the line modified )

                <div class="form-group field-zone_id">

                    <label for="zone_id" class="control-label">Your Zone</label>

                    <select name="zone_id" class="form-control link-style">

                        <t t-foreach="zone_rec" t-as="zone">

                            <option t-esc="zone.name+'--'+zone.zone_status.title()" t-att-value="zone.id"/>

                        </t>

                    </select>

                </div>


Don't know why I it is not showing code or quote for code i pasted here...

아바타
취소
관련 게시물 답글 화면 활동
1
2월 21
2535
1
2월 25
3636
2
4월 23
2869
2
2월 25
40636
2
11월 22
2911