Delete Link on Child Page

Hey Tadabase community! I have (likely) my last custom solution to share with you this year. :slightly_smiling_face:

This method can be used to create a scenario where users can delete a record from the child detail or edit page for the given record. Upon deletion, the user is redirected back to the parent page.

For the full details on how to configure this in your app, please see this video.

Below you can find the code snippets mentioned in my video to either remove or modify the button icon.

CSS referenced @3:31 that hides the icon.

.btn-danger > .fa-check{
    display: none;
}

JavaScript referenced @3:41 that changes the icon. Be sure to change the component ID accordingly if you choose this option!

TB.render('component_4', function(data) {
	var icon = $('.btn-danger > .far');
	icon.addClass('fa-trash');
	icon.removeClass('fa-check');
});
2 Likes

THANK YOU, Lee, for this!

Now (to look a gift horse in the mouth): Is it possible to add a confirmation dialog? I don’t know that I can use this process without either (a) a confirmation dialog and/or (b) an undo option.

William

Hey William! I haven’t done this before for a submit button, however, I recommend referring to Chem’s post here for reference on how you can add the confirmation for an action link. A similar method should be possible with the submit button as well.

1 Like

Hi!

I have 3 tables, template, users, temp email. Whenever I want to create record on the temp email, i would like to duplicate a template and assigned it to the temp email i made. while i am on the pop up window. I can add email continuously and when I am done, I want those email on that field be deleted. Is it applicable here? I made a structure. Please refer to picture below.

I want to clear the name and email when i hit send.

that list is from temp email table, and the button Send invite(s) is from edit of the template.

Thank you in advance.