How to change alert heading text "please correct the errors below"

Hi,

I used Plumsail form for SharePoint Online with the Vietnamese language.

So, please show me how to change the alert heading text “Please correct the errors below” when click Save button.

Thanks

Dear @dat,
Currently, there is no option to change the text, unfortunately. Please, write us to [email protected] and we can discuss potential implementations of this.

OK. Thanks Nikita so much. I will email to [email protected]

Hi again,

Please let me know and give me suggest code if I can change alert heading text.

Thank you so much

Dear dat,
Not sure which alert you mean, but all language constants are actually stored here:
fd._vue.lang

You can modify them before rendering:

fd.created(function(vue) {
    vue.lang.PlumsailForm_Submission_Success = 'Thank you!';
});

or later, here are examples of all possible options (some only available in SP):

fd._vue.lang.Failure_General = "An error has occured. Please check the browser console (F12).";
fd._vue.lang.Failure_ItemNotFound = "An item was not found. It may have been deleted or renamed by another user.";
fd._vue.lang.PlumsailForm_CorrectErrors = "Please correct the errors below:";
fd._vue.lang.PlumsailForm_Submission_Error = "An error has occured while saving the form. Please check the console (F12).";
fd._vue.lang.PlumsailForm_Submission_Success = "The form has been submitted successfully.";
fd._vue.lang.RequiredValidator_Error = "This field is required.";
fd._vue.lang.SPDataTable_AddNewItem = "Add new item";
fd._vue.lang.SPDataTable_ListNotFoundError = "List does not exist.";
fd._vue.lang.SPDataTable_Upload = "Upload";
fd._vue.lang.SPDataTable_Uploading = "Uploading...";
fd._vue.lang.SPFormToolbar_Close = "Close";
fd._vue.lang.SPFormToolbar_Edit = "Edit";
fd._vue.lang.SPFormToolbar_Save = "Save";
fd._vue.lang.SPFormToolbar_Saving = "Saving...";

Ok, Thank you so much

I have configured the variable fd._vue.lang.RequiredValidator_Error but it does not work.
I’ve put it inside fd.spRendered.

any ideas?

Thank you

Dear Albert,

You can modify them before rendering, this code block shouldn’t be in “spRendered” event handler.

fd.created(function() {
   fd._vue.lang.RequiredValidator_Error = "Your text";
});

Thank you very much for your answer!!! Works.
I take advantage of asking how I can translate the text that comes out when a field of a table is mandatory. The InternalName comes out, but I would like the Title to come out. Also, how can I translate the text?
Captura
image

Thank you.

Dear Albert,

You can use a custom validator here to append your message text: https://plumsail.com/docs/forms/javascript/controls.html#methods

fd.control('DataTable0').addColumnValidator('Column0', { validate: function(v) { return false; }, error: 'Custom error message!' })

Thank you!
But it does not work for me, it keeps going the same. I understand that it is put on fd.spRendered.

On the other hand, what are the “Add new record” and “Delete” tags:

image

image

Thank you.

Dear Albert,

Please consider this code:

fd.spRendered(function() {

	//Change "Delete" buttons
	
	var cols = fd.control('DataTable0').widget.columns;
	
	cols[3].command = [{ className: "btn-destroy", name: "destroy", text: "New Delete Text" }];
	
	fd.control('DataTable0').widget.setOptions({columns:cols});
	
	//Change default Error message
	
	fd.control('DataTable0').addColumnValidator('Column0', { validate: function(v) { return false; }, error: 'Custom error message!' });
  
    //Change "Add new record" button
	
	fd.control('DataTable0').widget.setOptions({ toolbar: [{ name: "create", text: "New Add Text" }],  })
})

Notice that:

  1. You should replace ‘DataTable0’ and ‘Column0’ with the internal names of your data table and column.
  2. You should replace cols[3] index with the number of your columns. For example, if you have 4 columns in your data table, then it will be cols[4].command.
  3. You should check for errors in your custom JS script, they can cause the whole JS script failure (also check the browser console F12).

Hi,

I am trying to edit the error message on edit item form. When I use the submission success message it works.

But the error message does not work for me, I still get default message (Item does not exist. It may have been deleted by another user.):

fd.created(function(vue) {
fd.messages.Failure_ItemNotFound = 'Not found!';
});

Ref: https://plumsail.com/docs/forms-sp/javascript/manager.html

Hello @aseem,

Welcome to Plumsail Community!

This is a known issue, and we are researching the reasons why ItemNotFound and AccessDenied error messages are not displayed when the corresponding event occurs. Possibly SharePoint doesn't allow to detect a particular event.

We will let you know once we have a solution for this.

Hello @aseem,

We've released a fix for error messages. Now ItemNotFound and AccessDenied error messages are displayed properly.

To upgrade to the new version, please upgrade the package in the app catalog. You can find the instructions here. And re-save the forms in the new designer (1.7.1).

Also, you might need to completely clear the browser cache.

1 Like

Excellent! Thanks you.

1 Like