Well, I showed you how to pop-up a warning. Then, you wanted red borders and I showed you how to do that. Now you want A-B-C-D, but, only show us the A part. Perhaps it is our language barrier, but, I do not understand what you really need. And, each time, you show us different items. Inputs, selects…
Sorry, yes language is a problem
Trying to tell the same thing from the beginning
Let me try to explain short short
Each line refers to an apartment block
I name the blocks alphabetically (A,B,C,D as)
The line codes of block A are fixed
Other block rows are added with Jquery
No problem so far
Before sending the user form, I need to check whether according to the rules
I need to tell which block is unregulated by popup window.
This popup is supposed to be with javascript alert()
This " data-id =“A” " tag is for maybe I can use it to figure out which block is wrong
name and number of your suggestions name = “name [1]” Adding the PHP process was easy for me and helped me to learn that which belongs to the block, thank you
Well, first, how do you know how many rows are placed for the user to enter?
If a user has 3 floors and another user has 8 floors, you need to add that to the page.
Next, you can not use separate “IF” clauses for each row of data since you do not know how many
there will be as example 3 floors or 8 floors. Therefore, you need to do this in a loop instead. And, you
would need to loop thru the correct number of floors.
But, for this example, we will use four rows, which would be four floors. You can use the “filter” function to load all the empty inputs into a variable. Just a few lines to do that. Then, you can loop thru them to create a better message. You could send one generic message stating that there are missing entries. And, if you add in the code to place red borders around them, it would work nicely. If there are a large number of rows of data, listing all the empty fields would be hard to display. For users, simple is best!
Here is one possible example that might work well for you.
I forgot to mention, this code also needed a blank at the top of each select option. It needed a way to create a blank selection so that the JQuery can see nothing and force the user to alter it. Meaning they must select each of the selects. To skip a select, just do not include the first blank option clause!
I tried found something like below but the popup window repeats
If this alert() does not repeat it will work.
On the second click, two popups are on top, and on the third click on three popups, and so on. https://jsfiddle.net/ademgenc/q4fkwpe0/101/
No iteration after adding blank to array below.
I think this will see my job
@ErnieAlex, Can you look at my javascript code with a professional eye, things like excess or wrong or unnecessary, or is this a correct solution?
I’m happy