Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
3396 มุมมอง

Hi all,

looking for solution how I can pass default values to a form field from specific URL. I have situation where visitor can click a product link that redirects to contact form. I would like to pass value via link to a field on that form, so he/she don't have to enter this choice again. 


I was trying something like this:

http://example.com/contactus?=


but that does not work. Any ideas how to solve that?

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

You can use one of:

- name
- phone
- email_from
- company
- subject

that will prefill your form


E.g.: https://17449094-15-0-all.runbot43.odoo.com/contactus?subject=foo&phone=bar

อวตาร
ละทิ้ง

This will work for the default Contact form, but for some reason it doesn't work for any custom forms built with the form builder snippet. Any ideas why not?

คำตอบที่ดีที่สุด

To Andrew Hastings : because it's coded that way in the core ... (and if you want something else, this is a change request)

It's (almost) the answer I received from Odoo

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ส.ค. 22
4030
1
เม.ย. 22
3137
1
มี.ค. 22
2544
1
ก.พ. 22
2366
0
ก.พ. 22
1989