Hi,
We added two file columns on the Account table and exposed them in a step in the multistep form. We want to make these file columns mandatory but the metadata attribute drop down does not list file columns. How do I make them mandatory in the multistep form -
The first two "Choose File" maps to Account columns and the third "Choose Files" uses the Notes entity to store multiple other files.
Prathyoo
Yes , it works similar.
-----------
If the above post solves your problem, please mark it as solution.
Thanks. I resolved this similar to your solution. I set Required property of the two file columns to 'Business Recommended'. Then in the 'Document' step of the multistep form I updated the following property to 'Yes'
And now the file columns are mandatory in the form. I see that this generates a javascript to carry out the validation. Can you also confirm that the validation also occurs at the server side if someone were to play with the js on the browser.
Hi @prathyoo ,
Method 1
Method 2:
Add below java script in Form Step
Example : Note* --> make changes based on your the field name/id
$(document).ready(function(){
//Replace Next with actual id of Next button
$("#Next").click(function(){
var fileInput = document.getElementById("fileInput");
//Change fileInput with actual id of file field
// Check if a file is selected
if (fileInput.files.length === 0) {
alert("Please select a file.");
event.preventDefault(); // Prevent form submission
}
});
});
Regards
Surendran Ravindran
--------------------------------------------------------------------------------------
Hope that helps.
If the post solves your problem, please mark it as solution. If it helps, consider a thumbs up.
WarrenBelz
146,645
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,997
Most Valuable Professional