Like this
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- ลูกค้าสัมพันธ์
- e-Commerce
- ระบบบัญชี
- สินค้าคงคลัง
- PoS
- Project
- MRP
คำถามนี้ถูกตั้งค่าสถานะ
1
ตอบกลับ
8467
มุมมอง
Like this
Hello KhacSon,
You can use one of these steps as per your requirement to add asterisk to all required fields.
Find code in comment.
Hope this answer helps you.
Thanks
Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwar
Solution1:
• While developing, as you’ll be aware of required fields so you can add the asterisk symbol directly:
.xml file:-
<div class="form-group field-confirm_password">
<label for="confirm_password">Confirm Password *</label>
<input type="password" name="confirm_password" id="confirm_password" class="form-control form-control-sm" required="required"/>
</div>
Solution2:
You can call the Js file where #register is your id of the form, find out the input tags having property ‘required’.
.xml file:-
<input type="password" name="confirm_password" id="confirm_password" class="form-control form-control-sm" required="required"/>
.js file:-
$('form#register').find('input').each(function() {
if ($(this).prop('required')) {
$(this).addClass("required");
}
});
.css file :-
.required:after {
content:" *";
}
Thank you bro!
It's exactly what i need.
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อRelated Posts | ตอบกลับ | มุมมอง | กิจกรรม | |
---|---|---|---|---|
|
4
มิ.ย. 19
|
6525 | ||
|
2
มี.ค. 15
|
5435 | ||
|
0
มี.ค. 15
|
3232 | ||
|
2
มี.ค. 25
|
1555 | ||
|
11
ก.ค. 25
|
18518 |
Display Asterisk in Required Fields
This module enables the display of an asterisk for required fields in Odoo.
https://apps.odoo.com/apps/modules/17.0/mh_display_asterisk_in_required_field