It is possible to add remove button in or beside file field element?
If visitor add wrong file, he won't be able to remove it...
If visitor add wrong file, he won't be able to remove it...
I have managed to find working solution.
โ
In Designer I have added in Multi field action.
First action in Multi action is File upload. Second is Custom code.
โ
File upload fields has defined ID (e.g: file_1).
In Custom code I have added button element and JS code:
โ
โ
I hope that this will help someone one day ๐
โ
In Designer I have added in Multi field action.
First action in Multi action is File upload. Second is Custom code.
โ
File upload fields has defined ID (e.g: file_1).
In Custom code I have added button element and JS code:
โ
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>That's it.
<button id="clear1" onclick="return false">Remove</button>
<script type="text/javascript">
var control_1 = $("#file_1");
$("#clear1").on("click", function() {
control_1.val("");
});
</script>
โ
I hope that this will help someone one day ๐
This topic is locked and no more replies can be posted.