Author Topic: How to create a simple pop-up form  (Read 6957 times)

Offline chris.shiplett@gmail.com

  • Newbie
  • *
  • Posts: 5
How to create a simple pop-up form
« on: June 21, 2010, 09:07:47 AM »
I have a plugin I've written that allows a user to automatically make a "task" out of an email in a custom built task management system I use.

Right now when a user clicks the plugin's "make a task" button, the task is automatically created.

I want to have it, instead of automatically creating, pop up a modal form that allows the user to add characteristics of the task.

I can't find anywhere a good explanation of how to pop up a simple modal form. I've tried to reverse engineer the modal form from the jquery calendar plugin and the modal form from the compose_addressbook plugin, without much success.

Can someone point to a resource for creating a simple modal popup in roundcube? Actually, it doesn't even have to be modal.

thanks,

chris

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
How to create a simple pop-up form
« Reply #1 on: June 22, 2010, 04:30:55 AM »
You just need to have your content in a div, then use jQuery to do the pop up.
Here is a simple tutorials that should work: How to generate simple pop up using Jquery - Stack Overflow

Offline chris.shiplett@gmail.com

  • Newbie
  • *
  • Posts: 5
How to create a simple pop-up form
« Reply #2 on: June 22, 2010, 06:21:37 AM »
Skaero,

Thanks, that tutorial will help a lot. It's also clarified for me what my central question is:

How do you append a div to the html output in roundcube? I'd like to just have an include php file that has all my content, and then run a line of code in my plugin initialization function that adds that include into one of the containers (?) or makes a container (?) on the mail screen.

Thanks,

Chris

Offline corbosman

  • Sr. Member
  • ****
  • Posts: 260
How to create a simple pop-up form
« Reply #3 on: June 22, 2010, 10:19:55 AM »
You can use the render_page hook for example.