You are viewing limited content. For full access, please sign in.

Question

Question

Error: error showing in console on required date field

asked on June 23 • Show version history

I'm working on some JavaScript on my form and so I have been watching the console messages to make sure all is well. 

I noticed that when I have a date field set as required and then change it's value it throws an error.

I am not using trim anywhere in my code and if I make the field so it is no longer required the error does not happen. 

It does not matter if I set required in the "rules" or by checking the "required" checkbox. 

It does not seem to be causing issues in running my code, I just thought I should report it just in case it could be causing others issues. 

 

EDIT: A snip of my code:

async function updateAuditDate()
{
  let currSigTxt = LFForm.getFieldValues({fieldId: currentUserSigTxtFieldID});
  
  await LFForm.setFieldValues({fieldId: theAPCompleteTxtID}, currSigTxt);
  LFForm.changeFieldSettings( {fieldId: theAPDateID}, {subtext: currSigTxt} );
  
};

LFForm.onFieldChange(function(){ 
  console.log("Audit Date Changed");
  updateAuditDate();

}, {fieldId: theAPDateID});

 

0 0

Replies

replied on June 28

Hi Genny,

Do you mean even without the javascript codes, you still see this error in Console? Could you provide some screenshots how the date field is configured and how you trigger the error? You can file a support ticket if you are sure it's not caused by custom js codes and share your design.

1 0
replied on June 29

I am using JavaScript, just not "trim" and the JavaScript does not need to be doing anything at all with the date field to cause the error. It just needs the date field to be set to 'required'.

When I have time i will create a test form and do a few more run throughs. Other than seeing the error in console it does not appear to be causing issues on the form function, so it's not exactly high priority  for me. :) 

0 0
replied on June 29

Okay I took a moment and just deleted all the code out of my current form (saving it aside of course), and the error still shows up in console whenever the date field value is changed. 

 

Screen shot of the settings on the date field... the other tabs are just the default settings. 

2 0
replied on June 29

I believe this is a bug and reproduced it myself, this is reported as bug #677805, it only happens when you set Required on Date field. non-required date field are not affected. But it does not seem to affect the value of the field, just the validation breaks.

 Thanks for reporting this!

2 0
You are not allowed to follow up in this post.

Sign in to reply to this post.