salahaldain-abduljalil's avatar

I have form and Inside it inputs

Excuse me guys I have form and Inside it inputs and one of them it is add and remove inputs dynamically so When I add the inputs the content goes behind the send button so I need to make send button moving dynamically and make space inside form can You give some solution please knowing the design I had cloned it from one page and I tried to solve this issue but it does not work.. I need solution please.

0 likes
2 replies
tykus's avatar

You need to share your current markup and relevant CSS

Tray2's avatar

I did something similar in a project a while back.

This is the markup

This is the js.

 function getElement(selector) {
        return document.querySelector(selector);
    }

 function getElements(selector) {
        return document.querySelectorAll(selector);
    }


function addTrackNode() {
        let node = getElement('#track-one');
        let clone = node.cloneNode(true);
        let trackNode = getElements('.track');
        let last = trackNode[trackNode.length - 1];
        clone.id = `track-${trackNode.length + 1}`;
        last.after(clone);
        clone.focus();
    }

It adds tracks beneath each other.

Please or to participate in this conversation.