How to make attachment default as public in webform

I had tried to enabled the check to make attachment public by defualt but it is not getting work on webform.

How to do this in webform?

Add this code in webform js file

$(document).ready(function(){
	$("div[data-fieldname=attach_field_name_here]").click(function(){
		setTimeout(() => {
			$(document).on('change', function() {
				$("button:contains('Set all public')").click();
				// $("label:contains('Private')").hide(); // code to hide private checkbox
			});
		}, 170);
	})
});
1 Like

Hi @ejaaz Thanks for the update , I just tried this but its not working.

Since i am on frappe cloud i cant access the backend files, could you provide client script which i can use in the front end or any other solutions ?

Oh, I don’t know how to apply from the Desk; try adding the script in this section.

@ejaaz tried over there but its not working.