Provably, it will be a silly question, but I don’t find the solution.
I’m trying to make a template to create a quote, but I’m stuck on the quote date. Can I have a formula inside the HTML that gets the date from today?
Provably, it will be a silly question, but I don’t find the solution.
I’m trying to make a template to create a quote, but I’m stuck on the quote date. Can I have a formula inside the HTML that gets the date from today?
You can use javascript to get the current datetime, e.g.
<%= new Date() %>
Of course, you might want a nicer format, e.g.
<%= new Date().toLocaleDateString("en-US") %>
If you have a “Quote” DB, you probably want to create and fill a “Date Generated” field.
Indeed, you might be better off using {{Creation Date}}
or similar
Yes, I thought about that, but that will never be the date that I created the PDF, but the date that I created a row-entity. Right?
This works amazingly:
<%= new Date().toLocaleDateString(“en-US”) %>
But could I make it to format with dots, something like: 31.01.2025
edited:
this works for me:
<%= new Date().toLocaleDateString(“fr-CH”) %>
Thanks! I’m discovering a new world with the PDF function in Fibery. It’s one of the reasons why I’m trying to switch from Coda.
You can pick a locale setting to get you what you want, e.g.
<%= new Date().toLocaleDateString(“de-DE”) %>
By the way, is there a way to make a select column to text? This is about the currency field, that is not recognized.
{{SelectField.Name}}
unless you meant a number field formatted as currency?
Yes! That’s it. Of course… I forgot I always have to put name to make like text, right. It coda, it was not like this. THANKS!