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

Discussion

Discussion

Changing Next Button labels with LFForm

posted on January 12, 2024 Show version history

I have a 3 page form where I want specific next buttons to change their labels as I progress through the form.

I copied this code from the manual as an example to try before testing my specific requirement but it fails with the error: VM4112 about:srcdoc:1 Uncaught (in promise) Invalid settings. As I have everything in place for this to work, can someone explain why the example is failing before I spend to much time on this.

LFForm.changeFormSettings({pagination: [{pageId: 1, label: "First Page"}, {pageId: 2, label: "Second Page", prevButton: "Back", nextButton: "Forward"}]});

This is for LF Cloud

0 0
replied on January 18, 2024

Found out that pageId: 1 variable is actually referencing the Field ID of the Page Tab which shows on the layout when in the JS screen. I had not made that association myself. Burn to learn, 1% smarter today.

1 0
replied on January 16, 2024

The code is fine, the issue appears to be within the form itself but unable to troubleshoot what the specific issue is. Even made a copy of the form and same result. I created a new form and the code worked as expected. Rather strange but true...

0 0
replied on January 12, 2024

Hi Jennifer, I understand this and have configured that, My particular requirement in my form is I need to be able to change the Previous and Next buttons labels as the form is being completed, hence why I was looking at the code above.

0 0
replied on January 12, 2024

The ability to change the Next and Previous button labels is built-in. You can find it in the page settings. I've included screenshots for both the Modern and Classic designers.

I hope that helps!

modern_designer.jpg
classic_designer.jpg
1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.