Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderator: amosbatto

Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By manalidhuri
I want to display alert message using javascript, if input document is not uploaded in dynaform.
Is there any solution?

User avatar
By programerboy
If you checked the required checkbox of the multipleFile, the form check empty files automatically
But if you want check it with JavaScript a simple code is like this:
Code: Select all
function check_form(){
	var uploadedFiles = [];
	var uploadedFilesCount = $("input[name^='form[multipleFileVar005]']").length/3;
	for(var i=0;i<uploadedFilesCount;i++){
		if(document.getElementsByName('form[multipleFileVar005]['+i+'][appDocUid]').length > 0){
			var temp = [];
			temp[temp.length] = document.getElementsByName('form[multipleFileVar005]['+i+'][appDocUid]')[0].value;
			temp[temp.length] = document.getElementsByName('form[multipleFileVar005]['+i+'][name]')[0].value;
			temp[temp.length] = document.getElementsByName('form[multipleFileVar005]['+i+'][version]')[0].value;
	if(uploadedFiles.length == 0){
		alert('You must upload at least 1 file');
	else if(uploadedFiles.length > 2){
		alert('You must upload maximum 2 files.');
printer not connecting

I have a hp printer. I decided to connect my hp pr[…]

Send information from PM to SAP

Hi team, i have a question, is possible send info[…]


Olá, alguém pode me ajudar na utiliz[…]

I am trying to make file upload field mandatory u[…]