How autoopen a form builder?

How can I auto-open a Form Builder?

Thank you

1 Like

Hi there, @Luis_Carlos_Barragan :wave:

Please try to add this code to the Custom JS field on the Settings tab of your widget’s settings:

const buttonSelector = ".es-forms-floating-button";

const listenDelay = 100;
const listenLimit = 500;

function listenForElement(elem, selector, delay, step, limit, resolve, reject = () => { }) {
  elem = document.querySelector(selector);

  if (!elem) {
    step++;
    if (step < limit)
      setTimeout(() => {
        listenForElement(elem, selector, delay, step, limit, resolve, reject);
      }, delay);
    else
      reject();
  }
  else {
    resolve(elem);
  }
}

function onButtonFound(button) {
  button.click();
}

window.addEventListener("load", () => {
  let button;
  let step = 0;

  listenForElement(button, buttonSelector, listenDelay, step, listenLimit, onButtonFound);
});

Check it out and let me know if it worked :slightly_smiling_face:

Hi Max, this is not working for me

Could you help me to check please?
Regards

1 Like

Hi there, @Luis_Carlos_Barragan :wave:

I see that you’ve already contacted my colleague Danis, and he’s forwarded your request to the devs. Danis will keep you updated :slightly_smiling_face: