T
T
Tarakkolya2014-07-14 13:26:50
symfony
Tarakkolya, 2014-07-14 13:26:50

symfony 2 dynamic form how to do?

You need to make a user registration form, and at the same time, the user can immediately add n-th number of videos. How can this be done correctly?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey, 2014-07-14
@Tarakkolya

If during registration you just need to specify links to the video (which I think is more adequate according to your description), then through the formtype of the collection you can dynamically add new elements of a certain type.
If you need to upload files - I would suggest to separate this logic. That is, if you really need to do it all on one screen - first register using AJAX, then start the file upload process.

B
BoneFletcher, 2014-07-14
@BoneFletcher

Next to the registration form, you can place any ajax file uploader with support for multiple uploads. While the user is not yet registered, save the video in a temporary directory, and after registration, copy the downloaded files to the user's directory.

P
Pavel Solovyov, 2014-07-14
@pavel_salauyou

This can be done, but this is a bad option, because. if he makes a mistake in the password, then he will have to re-send the video files, it is better to do a regular registration, and after it, immediately redirect the user to the video download page.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question