Skip to content

Require confirmation for photo component #7587

Answered by melohagan
mixmaniax asked this question in Help
Discussion options

You must be logged in to vote

Thanks for the additional context @mixmaniax

I've come up with a solution that may work for you, you'd just need to style it to your liking:

Step 1 - Remove the clear attachment button i.e. the 'X'

Add an embed to the top of your screen with the following content:

<style>
.delete-button {
  display: none !important;
}
</style>

Step 2 - Clear Attachments button

Add a button to your form and give it a name.
Define actions for on click and Update State; setting a variable named clear to 'true'.

Also configure conditions for the button as follows:

JavaScript binding

return (!$("State.clear") || $("State.clear") === "false") && $("New Form.Fields.Attachment")?.length > 0;

We are checking to…

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
3 replies
@mixmaniax
Comment options

@melohagan
Comment options

@mixmaniax
Comment options

Comment options

You must be logged in to vote
4 replies
@mixmaniax
Comment options

@melohagan
Comment options

@mixmaniax
Comment options

@melohagan
Comment options

Answer selected by mixmaniax
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
2 participants