• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Dynamically add fields?

Dynamically add fields? 16 years 10 months ago #3626

Is it possible to add dynamically new fields to a form?

For example I would like to register products by typing their serial number, but I don't know in advance how many of them the users will have. The ideal would be a button saying for example \"add more\" which would make appear using javascript new fields.
When the user is done he could click on a send button and all the fields would be sent.

Does that make sense?

And over all, is it possible to have rsform process fields that were not created via the admin interface?

Thanx in advance for your replies and help.<br><br>Post edited by: jfprevost, at: 2008/07/07 13:59
The administrator has disabled public write access.

Re:Dynamically add fields? 16 years 10 months ago #3629

  • dragonjc
  • dragonjc's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 151
First solution :
Maybe it's more easy to use an text area and go to line after everyone references.

Second solution :
Created a small independant Forms for the user to add their references. At the end, in your good for, with smal script, insert this value into a multiple dropdown (or selectfield). And rate the one he need.

If you choose the second solution, give me news, io will help you to build the function for.
Component RS SHow Form in build
The administrator has disabled public write access.

Re:Dynamically add fields? 16 years 9 months ago #3676

Thanks dragonjc for your help.

Actually my problem is bigger than it seems.
It's a form for a RMA (Return Material Authorization).
That is, a user will need to fill various information (serial number of product, date of purchase, apparent problem, etc.) for _each_ request.
A user (customer) might well only have one product to return, then the actual form is fine. But often he will have more than one (up to an unlimited quantity) different defect products to return.
For each and every different product it's necessary to fill in the above info.
But we don' want the customer to have to go through the entire form (including address, etc.) for each return request, so we need a form that could dynamically add the necessary fields for an additional return request and then submit all the requests once supplied into the form.

So my problem is that I don't know in advance how many return requests are going to be issued.
I have thought of javascript to add dynamically the new fields, with no problem. But how am I going to ask RSForm to take them in account?

More over there's a \"Script\" section when editing the form with a part 'called on form display' and another 'called on form process'. The second one seems to be processed only after the thank you message.
I believe that when the 'thank you' message appears the data has already been processed and the e-mail sent as well. So this isn't much helpful.

A (half) solution:
I might create an hidden field with rsform called for example 'rmadata' that would hold all the rma specific data (see above) filled by the user , concatenated with javascript. Then it would be split with PHP prior to sending the e-mail.
But how can I do this as the script called on process shows up after sending the e-mail...?

So I'm thinking strongly thinking about finding a solution. If anyone could help me ... ?

Thanks in advance.
J.F.<br><br>Post edited by: jfprevost, at: 2008/07/11 01:19
The administrator has disabled public write access.

Re:Dynamically add fields? 16 years 9 months ago #3685

  • dragonjc
  • dragonjc's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 151
Your problem is easy, maybe the solution is to cut yopur forms in several forms who are useful and have linked between.

First Customer register, so he have with is account the possibility to :
  • First time is connected, he access to a profil joomla based on RS!Forms Forms.

  • Second Time he have a second forms where he can add information pre register. Like address of delivery, and other information yopu need into a RMA (I work on assistance so know what is RMA ^^)

  • The third forms is the ask of RMA who have a selected field who user can select result from the second forms and add more information into other field or select field from your database of products. I one word, your RMA's Forms.This Third forms contain so an hiden field pre filled with Id from user, and select field who delivered Id from adresse of delivery or other information.





  • So the process is :
    First user connect
  • He Have access to one foms who is called : Asking RMA Generals informations (for exemple)

  • He Have access to an other one called : Asking RMA Products(for exemple)





  • For Asking RMA Generals information :
    He have link :
  • Add with RS!Forms (with a return URL to RMA asking products on click to submit)

  • Show list and details of their in formations with Mod Form List

  • Have a link to RMA Asking

  • For RMA Asking products he have the same forms for all products :
  • First field : an hiden field pre filled with Id of User

  • Second Field, List of Asking RMA Generals information of the user

  • After, all field you need for the RMA

  • On submit, URL to return to this page
  • If you agree with that i can help you a little on pre filled select list with pro version. But for next upgrade of pro version it will be more easy to do.

    Say me and i help you (i have my site to do too, so it can be not immediatelly, but i will help you.<br><br>Post edited by: dragonjc, at: 2008/07/11 19:16
    Component RS SHow Form in build
    The administrator has disabled public write access.

    Re:Dynamically add fields? 16 years 9 months ago #3690

    Thanks for your help dragonjc.

    I forgot to tell you that one of the requirements is to have the clients to input their RMA datas on one and _only_ one screen.
    They already have an account on the website (in fact that's how they can access the RMA form, only when they are logged in).
    When they arrive on the RMA form their infos (name, address, company, etc) is pre-filled (that part works fine now).

    The idea is to have a group of fields (quantity, product name, serial number, description and repair request) added dynamically to the form for each RMA request (there might be several ones).
    So that the client types in the infos at one time (he clicks on a \"add\" button for a new RMA request, which makes appear a new group of fields for a new RMA request).

    My idea is to have a hidden field named, for example, RMAnumber which would have as its value the number of RMA requests filled by the user (that value would be incremented every time a new group of fields is added).
    Then an other hidden field with its value updated with a concatenation of all the fields dynamically added.
    The processform would then split the value of this field by the number of RMAnumber (so that we keep track of how many fields have been added and how much data we are supposed to retrieve).
    At last, by email we would format as many tables as RMA requests issued.

    So I'm working on it...
    Thanx for your help.

    P.S.: si tu parles français msg moi. :)
    The administrator has disabled public write access.

    Re:Dynamically add fields? 16 years 9 months ago #3691

    Thanks for your help dragonjc.

    I forgot to tell you that one of the requirements is to have the clients to input their RMA datas on one and _only_ one screen.
    They already have an account on the website (in fact that's how they can access the RMA form, only when they are logged in).
    When they arrive on the RMA form their infos (name, address, company, etc) is pre-filled (that part works fine now).

    The idea is to have a group of fields (quantity, product name, serial number, description and repair request) added dynamically to the form for each RMA request (there might be several ones).
    So that the client types in the infos at one time (he clicks on a \"add\" button for a new RMA request, which makes appear a new group of fields for a new RMA request).

    My idea is to have a hidden field named, for example, RMAnumber which would have as its value the number of RMA requests filled by the user (that value would be incremented every time a new group of fields is added).
    Then an other hidden field with its value updated with a concatenation of all the fields dynamically added.
    The processform would then split the value of this field by the number of RMAnumber (so that we keep track of how many fields have been added and how much data we are supposed to retrieve).
    At last, by email we would format as many tables as RMA requests issued.

    So I'm working on it...
    Thanx for your help.

    P.S.: si tu parles français msg moi. :)
    The administrator has disabled public write access.

    Re:Dynamically add fields? 16 years 9 months ago #3696

    • dragonjc
    • dragonjc's Avatar
    • OFFLINE
    • Expert Boarder
    • Posts: 151
    lol je suis français ^^ donc message moi toi aussi ^^
    Component RS SHow Form in build
    The administrator has disabled public write access.
    • 1

    Read this first!

    We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

    However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

    For more information, the Support Policy is located here.

    Thank you!