Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

79
Views
variable from Bootbox input

I'm using bootbox for the first time. I'm using fullcalendar.io and instead of using basic alerts I have to use bootbox.

When I click on a day of the calendar a bootbox alert pops up and inside of it I have to receive in input the title of the event to add on the calendar, and the type of the event (meeting or ...).

The problem is that I don't know how to create inputs in a bootbox alert and, even if I did, I don't know how to then use this 2 inputs result as a variable to add them into the calendar.

const events = [];

document.addEventListener('DOMContentLoaded', function () {
  var calendarEl = document.getElementById('calendar');
  var calendar = new FullCalendar.Calendar(calendarEl, {
    selectable: true,
    initialView: 'dayGridMonth',
    headerToolbar: {
      left: 'prev,next today',
      center: 'title',
      right: 'dayGridMonth,timeGridWeek,timeGridDay'
    },
    dateClick: function (dateClickInfo) {
      createEvent(dateClickInfo.dateStr, 'Some event', undefined);
      bootbox.prompt("Inesrt the name of the event", function (title) {
      }
    },
  });

  calendar.render();
}),

function createEvent(title) {
  const event = {
    title: "",
    type: ""
  }
  events.push(event);
};

This is my super-basic code. I don't even know how to add the second input for the type of the event to the same bootbox. (I think I need to use the same bootbox because it calls the function who needs to have both the variables).

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!