콘텐츠로 건너뛰기
메뉴
신고된 질문입니다
2 답글
3119 화면

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

아바타
취소
관련 게시물 답글 화면 활동
2
8월 22
3585
1
4월 22
2794
1
3월 22
1985
1
2월 22
2009
0
2월 22
1844