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.
Related
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 :)
I looked for answers, but I am a newbie to PhP/JQuery so the answers I found confused me further.
I have a wordpress website that contains a form with a date selector field I am trying to determine when the user selects a new date and save that date to a variable to be used somwhere else
On change doesn't work cause of the lack of focus etc...
I tried select, and that didn't do anything
In the process of trying to figur eout what I am doing wrong, I simplified the code where once it is selected it gives me a message box! the code is below:
Any help is greatly appreciated!
$JScript ="<script>
jQuery('#wdform_2_element13').on('select',function()
{
alert('Here');
}
</script>"
You can stop the process when your saving all your data from the form, and call a new function to save or do whatever you want to that variable.
You can do that by pointing your form submissions to a specific file in the wp-admin directory called admin-post.php
Take a look to this tutorial and I'm sure you will learn some basic knowledge about WP code and also the answer to your question:
https://www.sitepoint.com/handling-post-requests-the-wordpress-way/
It turns out the reason is cause the field was a date picker that was already defined through the form maker i was using. So what I did was create a date picker using Jquery, then use the "onSelect:function" and that was it
Thanks for the help
I am customizing a theme and a plugin in Wordpress. The plugin has a button where a user can click to bring up a form where they can ask a question. I want users to use post questions through this button on this plugin, but I don't fancy the visuals on it. So I thought I'd make a form on my landing page that will post into the plugin's form. If this is a terrible idea in the long run, please feel free to let me know because I am still new to web dev.
So the goal is to create a new form whose aesthetics are to my liking but still use the plugin's built in posting capability. How do I make my form paste into the plugin's form and then submit it? You'll notice that my form has 1 additional field: the add money field. I also need to integrate this into the plugin. If anyone know how to begin modifying the code for this I'm all ears to anything I need to start reading or a general way of how to approach this.
My form
Plugin's form
Summary:
Need to have my form paste to plugn form and submit
Need to add a field to the plugin code that my form can post to similar to how the other fields will do do
You can post from a different form if you get the destination URL or javascript that is handling the original form post. You can use the debugger in Firefox or Chrome to inspect the page contents to see how the form is handled.
Adding the money field will be more complicated because you will need to update the server side handling to accept the additional parameter so that it is not simply ignored or causing errors. How much work this is depends on what the server has to do. It may involve adding a column to the database or creating a new table which you will likely want to do the wordpress way if you want to have something that is maintainable.
Lastly keep in mind, that every time the original plugin is updated, it may bust your add on code unless you create your own plugin from the original.
Hi I was wondering if somebody can point me in the right direction on how to accomplish the following in a custom joomla module in the module configuration form: http://blog.cbolson.com/adding-form-fields-via-ajax-with-mootools/
So far I use a textarea to supply a list of geo data (lat, lng and label text) in the format
lat1,lng1|label1\r\n
lat2,lng2|label2\r\n
lat3,lng3|label3\r\n
...
from the module configuration. This data is displayed on a google map.
It would be nice to have a more comfortable way of adding the data like in the example on blog.cbolson.com.
Create fields type as array say
<div class="test">
<input type="text" name="data[]" />
</div>
and via jquery clone you can replicate that div
and since its an array you can get all entered fields this is logic you can try and
regarding Joomla module Development you can refer Joomla DOCS http://docs.joomla.org/J2.5:Creating_a_simple_module/Developing_a_Basic_Module
You need to create custom form field type. Visit: http://docs.joomla.org/Creating_a_custom_form_field_type
Using a custom form field type, you can achieve what you want.
Well in that case first of all let me say that there are no from field type for button. So you have to perform the action with other event. may be with a radio button change event.
Next is as said by Mr Rahul, you have to create your own custom form field which should have a field path (addfieldpath attribute) that you can learn from here.
And then add a custom.js file to your custom file that is given to the addfieldpath attribute and perform the ajax action there as per your requirement.
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.