Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [form]

A web form, also called html form, is a special html element consisting of several input elements, that allows the users to enter and send data to the server. One of the most common type of forms are the contact forms in websites.

21
votes
1answer
7k views

How to save Custom Fields in Core components

I'm trying to add a single, simple field to each #__content item, and I've very carefully followed the tutorial at Adding Custom Fields to Core Components, substituting "content" for "contact". I now ...
7
votes
2answers
1k views

Is the new 'showon' attribute only for back-end forms?

I tried using the showon form field attribute in a front-end form with no working results. Not even the example given here is working: https://docs.joomla.org/Form_field#Showon Is there anything ...
6
votes
1answer
669 views

Custom XML attributes not showing in HTML markup

Here is the XML for a particular form field: <field type="text" name="first-name" id="first-name" label="MOD_LABEL_FIRST_NAME" required="required" maxlength="27" color="yellow" /> My ...
5
votes
1answer
201 views

Item being edited was created as a new record instead of saving changes after clicking submit

Has anybody encountered this kind of issue where in my edit form, after clicking submit, it creates a new record instead of saving the changes I made? it was able to load the data of the item i ...
5
votes
3answers
628 views

Editor stripping Script

I have a form which has been created in a CRM and then the code copied in to the website and updated to make it look and read better. However, when I copy the code in, the "script" at the bottom of ...
5
votes
1answer
1k views

Joomla token with ajax request

I've built a module that requests some data from the server via an ajax request. It includes the Joomla token to validate the session. An odd thing is happening-- when I open Chrome and load the page,...
4
votes
2answers
433 views

Where can I find list of the available Joomla-WYSIWYG-Editor buttons etc

I'm currently developing a component and I'm using a form. I'd like to give the user a limited access to the functionality of the editor. According to http://docs.joomla.org/Editor_form_field_type I ...
3
votes
2answers
1k views

Joomla CSRF form validation

I have noticed this happen occasionally with a component I am working on. I use JHtml::_('form.token') in the form and JSession::checkToken() or die('Invalid Token') to check it once i receive the ...
3
votes
1answer
1k views

Populate multi select data into the custom list field of form inside user management

I am trying to populate multi selected data on to the user management form below the name field of the user. Here is what I have added inside the form, in order to display multi selected data from db....
3
votes
1answer
153 views

Alter registration and comment forms

I am deveoping a small plugin that needs to alter the registration and comment forms to add 4 hidden fields that have data inside that I gather from the configuration panel, and when the form is ...
3
votes
1answer
42 views

How to to create a multi-layered form system

I am new to Joomla and I am trying to create a form system whose questions will change depending on what was previously answered. The idea is to store this data into a database and allow other users ...
3
votes
2answers
47 views

Form with nested set dropdown

I have to write front-end form in my component with dropdown list of categories and subcategories. Categories and subcategories amount should be unlimited. Should I use a nested sets model to do that?
3
votes
2answers
70 views

How can I change the Class of SELECT fields that Joomla generates'

I've disable chosen.js so that all my <select> tags are plain HTML, but am so far unable to change the default class of inputbox to one of my choosing, (specificially from the Search Tools ...
2
votes
1answer
209 views

Submit a view instead of redirect to another view

I have 2 views namely students and student. The students view will list all the students and student view is to show the details of the student. These 2 views are accessible for all staffs in the ...
2
votes
1answer
127 views

Components > Paypal Button not saving properly, neither iframe

I've tried to insert a paypal form + button on a component's type description and once I save a part of the code is gone. Before <form action="https://www.paypal.com/cgi-bin/webscr" method="post"...
2
votes
3answers
580 views

Can some form extension write to/populate with values from database?

I want to have a very basic form, basically just a couple text fields and a few checkboxes. Ideally this form would be able to save to a table somewhere with the userid/name of the user that filled ...
2
votes
1answer
3k views

Token check not working in custom component admin

I've built a custom component and have three forms that executes different tasks in the default.php view on subcontrollers within the administrator. Within my tmpl view default.php, each form has a &...
2
votes
1answer
378 views

joomla protostar formfield width responsivness

How is it possible to size formfield widths for Joomlas Protostar Template? <field name="titel" type="text" label="COM_COMPONENT_TITEL_LABEL" description="COM_COMPONENT_TITEL_DESC" class="inputbox"...
2
votes
1answer
52 views

How to develop a survey extension which prevents respondents from taking a survey more than once?

I'm looking for advice on how to make a survey for my Joomla production (3.6.4) site. A key requirement is to restrict respondents to only taking the survey once (i.e. preventing 'ballot-box' ...
2
votes
2answers
1k views

Preprocessing form data before saving to the database

I have a series of checkboxes on my form that together form an array when POST'ed. I want to save this data as a string instead (e.g., "##,##,##") before committing to the database. Here's what I ...
2
votes
1answer
875 views

Create form in frontend in a module

Am creating a simple custom search , where users will search using a droplist of option , i have successfully created the module , however i do not know how to show the form in frontend and how to ...
2
votes
1answer
679 views

Custom bootstrap error message

I am doing custom form validation at admin side and below is the sample javascript code Joomla.submitbutton = function(task) if(condition){ document.getElementById('jform_acc_reseller_id')....
2
votes
2answers
877 views

using ajax inside a component without using com_ajax? [duplicate]

I making a practice component and i would like to try make an ajax search . Inside my component i made 2 methods. Method search() and searchRes(). The first has the html form for the search bar and ...
2
votes
1answer
351 views

How to set localised format for dates in a calendar field of a form?

tI want to add a calendar field to my custom form: http://docs.joomla.org/Calendar_form_field_type But I'd like that expected date format would be different depending on user's active language, as "...
2
votes
1answer
79 views

Ftp folder permission for a custum contact form

I built my own custom form which is inside a Contact folder with the 755 permission. Since my email address is inside the contact.php should I change the permission to 700?
2
votes
1answer
426 views

Is it possible to render the same fieldset multiple times?

I'd like to render the same fieldset multiple times for batch create and batch update. Is it possible to do this with JForms? Currently I have a form like this: <?xml version="1.0" encoding="UTF-...
2
votes
1answer
102 views

Save multiple fields in DB

Please help advice. How to save multiple Fields in the database. I have a form with X number of fields. Fields added using JQuery <input type="text" value="" name="jform[phone]"> <input type=...
2
votes
1answer
267 views

Repeatable xml form field - Can't remove fields / Repeatable.js issue

I am playing around with the new repeatable form field in my component. I am getting a few js errors. Chosen repeatable.js:187 TypeError: 'undefined' is not a function (evaluating '$('select')....
2
votes
1answer
138 views

Custom buttons not working when inside module

So when I put these buttons inside an article they worked fine. As soon as I put them in a module (so I could show them dependent on if the user is logged in or not) they stopped working. The first ...
1
vote
3answers
3k views

Cancel Button in custom default.php layout leads to form validation error

I am facing a problem with my cancel button in my default.php, which is a form with some input fields aswell a save and cancel button. There are some required fields in my form. When I use the cancel ...
1
vote
2answers
334 views

Check a form field for duplicates before saving

I have a custom component where the user can add some data. Here are the two relevant fields: <field name="title" type="text" label="Title" description="Please enter a title" ...
1
vote
1answer
493 views

Joomla 3 form validation

Why the form validation does not work on Safari ? I tried not to load the JHTML::_(behavior.formvalidator) I load the fields from the XML file <field name="title" type="text" ...
1
vote
2answers
401 views

Joomla 3.7 change value in database after form button press

I want to do something really simple, but have to use Joomla what makes it probably complicated because I have less experience in Joomla development. I have field with a value (a number) which is ...
1
vote
2answers
713 views

Where can I find a good tutorial and/or example for creating front-end forms in custom components?

I'm building my first component for Joomla 3.x (I don't need support for 2.x). I've created my models (and unit tested them). I'm now ready to create the views. To start I just want to create a simple ...
1
vote
1answer
354 views

Let JForm-Fields be dependent on eachother

I would like to solve this problem: I got some Fields in my Form. Some are Combo-Boxes, Radio Buttons, Text-Inputs and so on. Now I would like to do the following: If Radio-Button 1 has value 1, ...
1
vote
2answers
1k views

Unable to insert form values in to database Joomla 3

I am creating a custom joomla module based on form submission but i am having some problems in inserting the values I have a html form which has certain fieldsets which pass values to mod_score.php ...
1
vote
2answers
3k views

Overriding save() method on form, how do I redirect to or show the form again after raiseError or enqueueMessage?

I am developing a component that uses a standard list/edit form to create records in the database (all of which goes smoothly) based on the Hello World! tutorial here. In addition to saving info to ...
1
vote
2answers
671 views

How to Create a Foreach Loop that Returns Users In a Specific Usergroup

My goal is to create an html select box via a foreach loop that returns all users within a specific custom usergroup (ex. usergroup = Agents). Once, the query pulls in all records (users) for that ...
1
vote
1answer
48 views

Don't add empty fields to database after submission?

Is there any PHP code which will allow me to NOT submit any empty fields to the database. I have a form with about 200 fields, and a lot of the times many of them are empty. How can I not add the ...
1
vote
1answer
138 views

XML form related fields

I need to make a form with dependent fields. I have already tried a lot of options, but have not found the right way. As in the picture below, I'm trying to load a new XML file when you select an ...
1
vote
1answer
844 views

Custom fields in com_content does not display when editing article in front end

I created a plugin to add a custom field following this answer. Works fine when I am logged in the backend and edit the article but the tab is not displaying when the article is being edited from the ...
1
vote
1answer
2k views

Joomla 3 submit a form via AJAX after javascript checking fields validation

Faced with such a problem, how to make sure that the used AJAX request is sent only in case of successful completion of the built-in Joomla js validator. The code pattern is about the <?php // ...
1
vote
2answers
2k views

Form validation with fields having space as value

This is the field in the admin side form which is ment to be required. <field name="exam_name" type="text" label="Name" required="true" /> In the form if I leave this field empty (null) then ...
1
vote
1answer
530 views

Showon works on plugin backend but not frontend

I'm changing user profile plugin in Joomla 3.3, using method described in http://www.inmotionhosting.com/support/edu/joomla-25/user-profile tutorial. Everything works and OK. But I want to make some ...
1
vote
1answer
91 views

How to write html tags under “contact details” in components > contact > contact us

Please visit this link : http://naadiastrology.info/index.php/contact-us On the menu bar, you can see "Contact us" menu.[Components > Contacts> Contacts > Contact-us in admin ] If you click on that,...
1
vote
2answers
250 views

CKform Checkbox issue

I'm using Ck forms component to build my forms. Every things works fine, except checkbox, they are not like what is planned. My question is : how to align them one next to one, and how to match Value/...
1
vote
1answer
1k views

Add onclick/onsubmit event to form submit

I have made a plugin that add few fields on joomla registration form. Now I need to add a javascript event on submit that will handle those extra fields I added, but I couldn't find any way to ...
1
vote
1answer
22 views

Joomla 3 - Text area in Editor field breaks the Admin section

I have an editor field with some HTML code in it. The HTML code consists of a form and one of the form fields is a text area. When this code is added to the editor field, the Admin section of the ...
1
vote
1answer
46 views

How to make form action to work?

I'm learning how to make my own module on Joomla. MyModule mod_planejamentomensal.php is like this: //No direct access defined('_JEXEC') or die; require_once dirname(__FILE__) . '/helper.php'; ...
1
vote
2answers
220 views

Save multiple list custom field for component

I 've created a custom form field type class JFormFieldCategories extends JFormFieldList { protected $type = 'categories'; public function getOptions() { $db = JFactory::getDBO(); $...