コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
3414 ビュー

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
4042
1
4月 22
3153
1
3月 22
2663
1
2月 22
2375
0
2月 22
2000