+ 1
Question closed! How to prefil a current date input using HTML CSS?
Hi, I use HTML/CSS for filling in forms online and the output is a document PDF. Is there a HTML/CSS-only solution for adding a current (system)date dd/mm/yyyy to this document, without using javascript or php? Thanks in advance.
10 Respuestas
+ 4
Example of script tag:
<script>
//Javascript in here
// place this tag at the bottom before ending body tag
</script>
But again, its using javascript. im sorry that i couldnt help u :(
+ 3
:(
But can't you use <script> tag?
Why is your software limited tho?
+ 3
Bernard Kemman lol no problem :)
+ 2
I'm sorry you would have to use javascript :(
let date = new Date()
console.log(date.getFullYear())
you can dynamically change HTML's display of date from javascript
document.getElementById("yourDate").innerText = date
+ 2
Thnx "maf" but unfortunately our software environment doesn't allow JS :-( , Just HTML CSS.
+ 2
The reason of not using JS, is that we are using XML for filling in fields/forms. The data is used to produce documents in pdf, like personalized contracts for example.
+ 2
Can you give me an example of the script-tag?
+ 2
Unfortunately, I was wondering I could save time by prefilling dates in the forms. A good excuse to study JS, thnx a lot maf.
+ 1
JME I already thought something like that, because I can't find any solution on the web. Just a time attribute which isn't working....
0
Nope, have to use js for dynamic content like that.