How Do I add a button to the detail view of an LFD

Can you provide code that will allow me add a button to the detail view of an LFD that links to another screen?

In order to do this you need to edit the LFD component HTML and need to add some javaScript to the screen JS.

Edit the component HTML and view the Detail template. After line 51 add the following HTML.

<div class="btn btn-primary" id = "navigateButton">Custom Button</div>

Add the following javaScript to the screen JS under the Developer options:
Change the ‘screenToNavigateTo’ to the name of the screen you want to navigate to when clicking on the button.

$(document).on('click', '#navigateButton' ,function(){
	Fliplet.Navigate.screen('screenToNavigateTo');
});

4 Likes