I have a PDF form where I want to be able to display the date the form was saved - forms

I have a form that I use daily as a transmittal for when I send items out. I would like once I save the form, the date is displayed. I know how to use the current date format, but this will change the next time I open the saved document, and I want to be able to see the last time it was saved, and not the current date.

This works only with Acrobat-JavaScript enabled viewers:
Create a text field where you want to have the last save date
Add the following script in the WillSave event (in Acrobat XI, it is in the JavaScript Tools --> Document Actions --> Will Save dialog):
var now = new Date ;
this.getField("mySaveDate").value = util.printd("yyyy/mmm/dd HH:MM", now) ;
and that should do it.

Related

I want to create a datepicker with options for start date and end date like trello

I want to create a date picker with options for start date and end date so the user can choose if he/she want to apply start date or end date.
I am currently implemented the following
current implementation
And when I change the date from the datepicker the options are gone.
error on current implementation
I am using https://www.daterangepicker.com/ library If there is another library it is welcome.enter image description here
This is what I want to create like
enter image description here
you can see it on if it is deleted https://ibb.co/1QvtjmS

selecting records on a continuous form, sending to a single form- access 2016

I have a continuous form to which I added a checkbox column for each record. I'd like to click on the checkbox and open a single view form for that specific system_id. This is my current code, it's prompting me for an ID field but when I enter the system_id field nothing happens. I don't want a prompt but rather have it seamlessly open the record into the single form. Continuous form is called: [P2P cases] and the single form is called: [P2P View]. Advice please!
current (not working) code:
Private Sub View_Click()
Forms("cases").Form.[P2P View].Form.Filter = "qaID=" & Me.system_id.Value
Forms("cases").Form.[P2P View].Form.FilterOn = True
Forms("cases").Form.[P2P View].Visible = True
If Me.system_id.Value = True Then
Forms("cases").Form.[P2P View].Form.system_id.SetFocus
End If
End Sub

VBA to verify if text exists in a textbox, then check if date is in the correct format

I have an excel form that I created in combination with VBA. In the form I have a textbox in which the user is to type in a date.
I have created this VBA clause to ensure the user types in a date that supports the format xx/xx/xxxx.
If Not IsDate(textboxDate1.Text) Then
Call MsgBox("Please select a correct Date format", vbOKOnly)
Exit Sub
End If
However, with this VBA code, the user is required to enter a date, whether the user needs to or not. So when I have a 4 other textboxes to input a date in my form, and the user only needs to enter in 1 date, and not 5, I have the problem where the user is required to put in a date for the other four textboxs in order submit the form.
So my question:
What VBA code is available to first determine whether text exists in the textbox, and then second to determine whether the date is in the correct format or not.
I was trying something similar to this:
If textboxDate1.ListIndex = -1 Then
but I couldn't get it to work with the IsDate clause.
Many thanks in advance.
If (Len(Trim(textboxDate1.Text)) <> 0) And Not IsDate(textboxDate1.Text) Then
Call MsgBox("Please select a correct Date format", vbOKOnly)
Exit Sub
End If

Ext JS 4 - how to add a time stamp to a text area form field?

I have an form with a text area field. I want to add some text (a date/time stamp) when the user clicks in to the form. I am assuming I need to catch a click type event when the user clicks in to the field and then edit the field value and insert the text I want. Is this the best approach?
Looking for suggestions based on using Ext JS 4 / MVC.
As mentioned by you - "I need to catch a click type event when the user clicks in to the field" - One way to achieve this and appending of timestamp to the value could be by using the focus event in following manner:
focus:function(){
var value = this.getValue();
value += new Date().getTime();
this.setValue(value);
}
Just that the date used here is the client's system date.
Hope this helps.

SmartGwt DateItem useTextField=true - how to make text entry field UNeditable

Since I can't figure out how to solve my problem presented here I'm thinking for the moment at a temporary solution.
I have a smartgwt DateItem widget:
DateItem date = new DateItem("Adate");
date.setWidth(120);
date.setWrapTitle(false);
date.setAttribute("useTextField", true);
date.setAttribute("inputFormat", "yyyy/MM/dd");
date.setAttribute("displayFormat", "toJapanShortDate");
Because the attribute useTextField is set to true we can see the text entry field. How can I make this text entry field to be uneditable.
Actually I want to have only the possibility to choose the date from calendar and not to change it manually.
Resolved - the issue exposed above - thanks to #RAS user.
TextItem textItem = new TextItem();
textItem.setAttribute("readOnly", true);
date.setAttribute("textFieldProperties", textItem);
Related link
But I have now another issue (resolved - see here):
The date chooser won't show the date on the text field but Today's date.
For example, enter 30/05/2009 on the text field, go to another field, then come back on click on the date chooser and the selected day will be Today's date instead on June 30th, 2009. Which is the reason for this? Can this be solved?
Also let's say I let to the user to opportunity to manually modify the date - can I put some **validators on it?** (still need an ideea on this)
Thank you.
date.setEnforceDate(true);
http://www.smartclient.com/smartgwt/javadoc/com/smartgwt/client/widgets/form/fields/DateItem.html#setEnforceDate%28java.lang.Boolean%29
You have a lot of different validators. Depending on the context it must be possible to validate cardinality, relation to other data items, datatype(not only date time values) and relations to other external records.