build dynamic field in form symfony - php

I'm asking you for a little advice on creating a specific form in Symfony3.
I need to create a form that upload's an unspecified number of files, which every file has a description text input that belongs to that file.

That's the doc you're looking for https://symfony.com/doc/current/reference/forms/types/collection.html
Come back for more details later :)

Related

SilverStripe form pagination

I am using a form on a SilverStripe page, the form is currently quite long. I am looking for a way where I can paginate the form. I would like to have 5 fields showing. Once them fields are filled out the user could then click next and be shown the next 5 fields. Also a previous button would be required. Thanks for your help if you need any more info let me know.
You probably want to look into the multi-step-form module : "MultiForm is a SilverStripe module, allowing flow control for forms, and step process to be automatically determined based on configuration variables on each step class. It augments the existing Form class in SilverStripe."
I believe this allows you to do what you need. The github repository has a complete example to set up and I recommend reading it in detail.

Move form entries between Wordpress Gravity Forms

I have a tournament with multiple divisions and multiple forms for which I use gravity forms.
There are times when someone requests to be changed to a different division. However, I am unable to move the competitor from one division to another in gravity forms, as the divisions are each using a different form ID (and they have still not developed a method for helping with this).
How would I go about moving a SINGLE ENTRY from one gravity form to another forms entry list please.
We have many teams at the tournament, so mass export and import is not what i am looking to achieve. Its about being able to move a single entry from one list of entries in one form to another forms list of entries?
ANY help would be greatly appreciated. Even a simple "use this method" in general terms will help me greatly. Would I use some form of JQuery fiddle, a php script, an sql script or what please as Import Entries is not available currently in GF
Regards
You can not do that, but instead maybe you shold design your form to include all types of submissions logic. I mean you can put a drop-down field at the beginning of your form. Then you can use https://gravityview.co/ to edit your single entry field.
I have a workaround for this which i am using in one of my current projects for http://projects.dzign-r.com.au and that is,
1) export both of the the forms (i.e the one from which you need the field to move and the other to which you need this field to be moved to) and it exports these as json files
2) search for the field ID that you need to be moved to another form, cut its json code from the json file and paste it in the other form's json file where you need it to be moved to
3) then import the form back. and test it to make sure it works as you want it, (as a caution you may change the field ID after you paste it in new form to be something which is not used in this form already).
4) once u see everything is fine u may just delete the old form?

Drupal 7: Field input generated by wizard

I'm new to Drupal, but not new to PHP/MySQL/etc...
Problem:
I have several forms that are completed by the user when performing various actions (upload, edit, create, etc). One of the fields contains project information that needs to be input in a specific manner. To prevent human error, I'd like the field to be presented as a guided input. I could create each of the required fields on every type of form, but it seems more efficient to create one dynamic field and reference it on other forms. Is there a straightforward method of accomplishing this? Would creating a custom field type that stores array-based values achieve this?
Desired outcome:
A modular way to add a field into applicable forms that guides user input.
I ended up solving this by creating a custom field using hook_field_widget_info() and hook_field_widget_view() to make a textarea. The guided input is returned to the textarea with JS as a JSON string (this is the field that stores in the database). The JSON string is processed in JS for display in the formatter.

how to add custom input field in limesurvey

Hi I want to add an autocomplete input field in limesurvey but don't know hot accomplish this task. Any one know where to add code for add custom input field?
in autocomplete.js
In this file the code that call a php function on the base of keyup in input field.
in checkInDb.php
In this file the code check term that come from **autocomplete.js** and search in database then send response back to js file
Where to add this code?
In the LimeSurvey documentation it explains very well how to modify the surveys with Javascript.
You don't explain too much, but I think you can find the solution here.

Adding input fields to a cakephp form through admin

I am struggling to find out if I can do this but I have a cakephp form with many input fields and when submitted I write them to a text file I can add fields in dynamically here by clicking a button but:
My question is if I have an admin page how do I get that to dynamically add fields to the page and make them stay there forever not just for that session?
Really stuck figuring out how to do this any guidance would be much appreciated.
Thanks in advance.
Make them persistent. You need to store the form and the fields it has: "Form hasMany FormField". The fields should describe a type so that the FormHelper will render the correct inputs.
When you want to display the form read that information from the db again and render the form according to your stored information.
I am guessing you already have a javascript function that dynamically adds the field to your admin page. Is that correct?
I don't use CakePHP, but a general workaround I use is to use the javascript function to at the same time update a table in the database that stores the form layout.
Here are some Jquery Form builder plugins that you can use to achieve the goal.
http://www.berthou.com/us/2009/09/05/dynamic-forms-builder-with-jquery/
https://github.com/botskonet/jquery.formbuilder
http://code.google.com/p/jquery-form-builder-plugin/
http://www.elizaibeth.com/2010/11/23/dynamic-jquery-form-builders/
Here is an excellent link of PHP FormBuilder class with tutorial, that you can use as a vendor library into CakePHP.

Categories