Hello Scribus Community
I need to create PDF form. I need in one place to give users a chance to add new fields (if there are more than one motive).
Design isn't important in my example at the moment (I will take care about that when I figure how to solve this issue) but for further java script code I called my grouped objects that I want to be copied "MOTIVE". In attached picture "MOTIVE" is that gray bar with "Motive name" , "Quantity", "Height (cm)", "Width (cm)" fields. Button "ADD NEW MOTIVE" isn't grouped with "MOTIVE"- its above it. I wish to add js to this button to simply create/copy "MOTIVE" object just below (without any gap). New object should contain "REMOVE" button (maybe "ADD NEW MOTIVE" should just put below some hidden object- lets say "MOTIVE 2" already with "REMOVE" button?). Each REMOVE should delete just his own MOTIVE.
I'm not familiar with Java Srcipt at all, but I was intense looking on the web for some solution or just example code to modify.
I've found some solution that is perfect for me (If I only know how to use my "MOTIVE" category it this code) but simply I just don't know how to implement this "add fields" function to my case"
here is this code with demo of it:
http://jsbin.com/cubihomapo/edit?html,js,outputI'm really confused (as JS noob) how to avoid html apperance in java script code for Scribus.
Can anyone give me some advices how to start? Or maybe someone had similar problem and found solution? I'm not asking for ready code but for some tips for begginer- how to copy existing object (MOTIVE) in desided place by clicking button. Of course if someone can put here working code that would be super.
Hope that is possible in Scribus- If definietly not- please let me know- this is urgent task for me so maybe should I search for other tool. (It has to be one file- PDF- without any additional files- my boss don't want me to code such form in html/css/js which I found easier with many html/css/js forums. So I decided to use Scribus with some JS magic:))