How to redirect to Form from Portal

How to redirect to Form from Portal

Create a Webform with the document you want, then redirect to it with an <a href=".......">.
For more info: Customizing Web Forms

Thank you
href is working for web pages
can we redirect to new form with values

for example i need to move to Task Desk New From With Default Project Value ?

can we give argument in href val

Yes,
to create a new webform you need to go with this url:
http://your_server/your-web-form-route?new=1
and if you want to pre-fill some value, go with this one (here setting the currency to CAD):
http://your_server/your-web-form-route?new=1&currency=CAD

Thank you
It is working

Then how to get the value (currency=CAD) from the url?

The flow:

  • webpage button (with link to http://your_server/your-web-form-route?new=1&currency=CAD)
  • click button go to the webform
  • in webform there is a field for currency
  • get the value from url and fill it in the currency field.

I use get_url() but getting the whole url.
Please help. Thank you

If I recall, in your python get_context() method you should add:

currency = frappe.local.form_dict.currency
context['currency'] = currency

then you can use it in your html as {{ currency }}

Thanks. I will try that.

Hi @mel_erp.
Bu how can I change the success submit button, If it’s un “insuccess”, pretty pls?
Let’s say in my webform I have a select field.
If yes, than leave the custom success form ti a success page, but if “no”, as an answer, to another page webpage, as Inssucess page?
Pretty pls, or pls guide me to a web resource to find help on that.
I can find nothing related.

Thank you in advance