When i am selecting an option from drop down box then display no. of forms with captures data.
That is looking like this.
I own a form with some fields like No. of Applicants, Applicant Name, Telephone, E-mail, etc...
When i want to select No. of Applicants are 2 then display 2 forms with relevant fields and capture the first form data to other forms.
When i want to select No. of Applicants are 4 then display 4 forms with relevant fields and capture the first form data to other forms.
It is depending upon user selection. But how many numbers are selected by user then display that forms automatically.
I am searching on Google, but not find out.
You can make it using JQuery
let no of applicants 2
for(i=1;i<=2;i++){
$("#appenddiv").append('<input type="text" name="test'+i+'" value="" />')
}
I'll try to explain my problem and let´s see if I get some help.
I`m trying to design a DB. This data base will contain users and forms but my problem is how to design it to save forms.
The forms will be created by the administrator when he needs them, so in the DB I have a table to save the form name. Another table with all the possible fields for all the forms and another table where form-names and fields will be save so I can see all the field that a determinated form has.
An example: In FormName table I have 3 form names: Personal Info, Computer Knowledgement and hobbies. And in Fields table I have, for example, Name, Address, Phone, Operating Systems, Programming, Bike ridding, playing pc games.
I decide to create a form with name number 1 (Personal info) and fields number 1,2,3 (Name, Address, Phone). This information is recorded in another table called full-form where it´s saved form name id and field id. This is pretty clear for me (perhaps I´wrong).
The tricky part comes now. Some user decide to fill the personal info form so the name of the form and each field will has to displayed. When the user fill the form it has to be saved some way so the administrator can see the name of the form, each field that that form has, who filled the form and the information written in each field. And all this should be displayed not only in the DB but in some different way like a table, for example.
By the way... I´m using cakephp and mysql.
Thanks in advance,
Abraham
As far as I understand, setup looks like this. As you said, we have 3 tables:
'formname' = id, name (for form names)
'formfields' = id, fieldname, attributes (for form names, added attributes in case you need them)
'forms' = id, formname_id, formfields_id, formfields_order (ready forms and possibility to order field in form)
And also you should create additional table where to store submitted values
'forms_values' = id, forms_id, value (in this case one row for each field)
If you want to relate those values to specific user, one more table should be created
'users_forms' = forms_values_id, user_id
Of course there should be users table as well.
My suggestion is to drop table 'formnames' and put form name in 'forms' table.
Then table 'forms' will contain
id, form_name, formfields_id, formfields_order
Hope this answer will put you forward :)
I need to make a form to retrieve values from database. The form will have a date field AND/OR drop-down and a row of three fields as default. The user can add/remove extra rows as per required.
The three fields are:
drop-down with options as table name from db(eg. employee_name,vehicle_name etc)
drop-down for conditions (like/equal-to/greater-than etc)
text-box where user can input data (eg. ford,suzuki etc).
How can I make a form where I can add/remove fields as required and then retrieve the values through a PHP code and use that as query to select and display appropriate values from database?
I use PHP Codeigniter method to build this custom search form.
form image
I am using plugin "my theme login" and "CIMY Extra User Fields". i want to fetch the value of dropdown "state", the values are stored in table "wp_cimy_uef_data". I am using CIMY User Extra fields to allow my users to add lots of other information in their profiles, including state in dropdown. Now, i want to get the value of state specified for each user.
You might want to use:
$value = get_cimyFieldValue(user_id, field_name);
http://www.marcocimmino.net/cimy-wordpress-plugins/cimy-user-extra-fields/documentation/
I have one JavaScript through which I am getting a list of companies from memcache with auto-suggest. If I type 're' in the text box, then it will return all the company names that start with 're'.
I have another JavaScript through which I am getting a list of mutual-fund companies from memcache with auto-suggest as well. If I type 're' in the text box, then it will return all the mutual-fund company names that start with 're'.
I would like both to work on the same text box with a radio button that lets the user choose between 'ALL', 'MUTUAL FUND', and 'COMPANY', so if 'ALL' is selected, auto-suggest should suggest from both company names and mutual-fund company names based on the text inputted.
I've written my page in PHP.
Take a look at this tutorial:
http://www.dynamicajax.com/fr/AJAX_Suggest_Tutorial-.html
And then pass the id for the radio buttons