Frontend: how to use a button to create sections?

  • rd
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 60
  • Thank you received: 2

rd created the topic: Frontend: how to use a button to create sections?

Hello Mihaela,

may I ask another question?
We are about to implement a form that enables the user to fill out a part list with as mutch parts he likes to define.
At the Start only one Part exists with the following Attributes:

+ description of the part (TextField)
+ Dimension in mm (Textfield)
+ Example Picture of the Part (Fileupload)

The Part is implemented as a section.
If the user likes to add a new part, there is a button at the end of the part that adds another part.
This is how our form looks like:

form
-+ Part1
--+ TextField1
--+ Dimensions1
--+ FileUpload1
--+ Button1 (adding Part2)
(from here on, the parts should be created and added automatically)
-+ Part2
--+ TextField2
--+ Dimensions2
--+ FileUpload2
--+ Button2 (adding Part3)

-+ Part3
--+ TextFiled3
--+ Dimensions3
--+ Fileupload3
--+ Button3
.
.
.
and so on ...
We could have done this by implementing a predefined number of parts and hide or show them using a Selection Group.
But either we have far to many Parts or to few as we dont know how many parts it will be at the end. So this should be solved via a button that adds the parts without creating them upfront.
The Section and Element Names stay the same but should be incremented.
So, is it possible to give a button this functionality?

Thank you very much
Regards
Rolf
#233445
  • Posts: 2147
  • Karma: 75
  • Thank you received: 277

mihaela replied the topic: Frontend: how to use a button to create sections?

Hello,

There is an option to create a form with sections add/deleted by pressing a button.

Please take a look at this example crosstec.org/en/downloads/free/form-apps...ows-dynamically.html on how to create form with add/delete section(row).

This would partially suit your needs, but form elements always have to be previously created.
You wrote "But either we have far to many Parts or to few as we don't know how many parts it will be at the end. So this should be solved via a button that adds the parts without creating them upfront.".
Unfortunately, there isn't an option to have new elements in your form without previously creating them as many as you think might be needed in the end.

To sum up, the only way to achieve what you want is to create a large number of sections (Parts) and then use add/delete rows functionality so that on form upload only one "Part" is displayed.

I'm not sure whether it would suit your needs, but maybe out free component ContentBuilder could help you in this situation. You can tahe a look at demo here crosstec.org/contentbuilderdemo/demo-examples/adress-book.html .

You could create a form with this fields:
+ description of the part (TextField)
+ Dimension in mm (Textfield)
+ Example Picture of the Part (Fileupload)
Then you would create a View based on the form and let the user see only his records and he could make as much submissions as he wants.

Let me know whether this helped and whether you've managed to set this to work as wanted.

Regards,

Mihaela
#233449
  • rd
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 60
  • Thank you received: 2

rd replied the topic: Frontend: how to use a button to create sections?

Hi Mihaela,

sorry for my late response. I haven't found the time yet to look into your solution in detail. So far it looks very promising. I will get back to you and will let you know if it works for us.
Again thank you for your help.

Regards
Rolf
#233661
  • Posts: 2147
  • Karma: 75
  • Thank you received: 277

mihaela replied the topic: Frontend: how to use a button to create sections?

Hello,

Ok, let me know then.

I hope it will work out for you.

Regards,

Mihaela
#233669
  • rd
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 60
  • Thank you received: 2

rd replied the topic: Frontend: how to use a button to create sections?

Hello Mihaela,

I forgot to give you a feedback --- your solution works perfect. It would have been more elegant if we do not have to create all sections in advance, but it works.

So, again :-) thank you very much
Rolf
#233871
  • Posts: 2147
  • Karma: 75
  • Thank you received: 277

mihaela replied the topic: Frontend: how to use a button to create sections?

Hello,

I'm glad that I've helped and that you've managed to apply this solution to work for your form.

Regards,

Mihaela
#233892
Moderators: ForumSupporttomeperica
Time to create page: 0.072 seconds

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99€

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here