Forums

Button for add/remove additional form inputs (solved)

Freezaman 21 Oct, 2013
Hi there,
in advance i want to apologize for my english🙂

I need to create CV form that will finish in PDF output. Now i am trying to create button that will add some inputs and button that will remove last added inputs. I am half done thanks to FAQs http://www.chronoengine.com/faqs/2700-how-can-i-have-a-button-to-add-more-form-inputs.html . Another problem is that i can't use those input values in my submit PHP. I am using FPDF for PDF creation.
So the questions are:

1)How to create the remove button for last added inputs.

2)How can i use values from added inputs in PHP(after submiting form)

Any hints would be appreciated
Thank you for any help
Max_admin 22 Oct, 2013
Hi,

#1- one idea for the remove button is to create a link inside the main div of the create element and set the click event to delete that parent container.

#2- The inputs should be available in the data array after submitting the form, how do you reference them in your PDF ? please place a debugger action in the "on submit" and show us the output!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Freezaman 24 Oct, 2013
Hi,

1)This one i managed to finish and its working fine (thanks GreyHead)🙂

2)I am trying to print it to html page before i will try it in PDF but still i can't get to the input values. Here is the debug of array
[zam] => Array
        (
            [1] => Array
                (
                    [name] => Rob
                    [address] => some city
                    [OD] => 09. 05. 2007
                    [DO] => Dosud trvá
                    [pozice] => Brah
                    [info] => this and that
                )

            [2] => Array
                (
                    [name] => bill
                    [address] => ravr
                    [OD] => 30. 01. 2002
                    [DO] => 06. 02. 2002
                    [pozice] => lollygaggin
                    [info] => makin chips
                )

            [3] => Array
                (
                    [name] => Ruda
                    [address] => Teplitz
                    [OD] => 09. 05. 2000
                    [DO] => 10. 05. 2007
                    [pozice] => ele
                    [info] => makin something
                )

        )
GreyHead 24 Oct, 2013
Hi Freezaman,

You will need either {zam.1.name} or <?php echo $form->data['zam'][1]['name']; ?>

Bob
Freezaman 24 Oct, 2013
Works perfectly with
<?php echo $form->data['zam'][1]['name']; ?>


thank you very much guys🙂
GreyHead 24 Oct, 2013
Hi Freezaman,

Great :-)

Sorry about the typo - I fixed it now.

Bob
This topic is locked and no more replies can be posted.