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.
140
questions
0
votes
1
answer
238
views
Using a custom field with different names
I want to use a flexible field name for a field across different forms thru my extension.
My custom example field looks like this:
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\...
0
votes
1
answer
112
views
Associate template to getMailer class
I have created a custom form, after submit send email to recipient with JFactory::getMailer
With this class can add body, for example:
$mailer = JFactory::getMailer();
$mailer->addRecipient('test-...
0
votes
1
answer
151
views
Joomla editor field type text not posted when submitted
I'm working on a custom joomla module. It has a form with an "editor" type field. The fields are defined in the related xml file:
<form>
<fields name="main">
<fieldset name=...
1
vote
0
answers
135
views
Variables in XML form definition
I'm creating a form using the Joomla XML form definition, and I want to create a range of integer values a user can select from. The number/integer field is fine for this use-- but I need to allow the ...
1
vote
1
answer
67
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
1
answer
956
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';
...
0
votes
1
answer
321
views
How to access user-submitted values from a dynamic form?
I want to insert a row in my db-table with inputs from users. The form the users fill out is made with a foreach-loop:
foreach ($results as $row) {
echo '<div class="vm_kampe"><input ...
0
votes
2
answers
654
views
Convert article to PDF?
I was wondering if anyone knows of any way to take the HTML content of a custom module which is placed inside an article and convert the HTML to PDF via the click of a button or so.
So basically the ...
1
vote
1
answer
119
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
1
answer
1k
views
Assign user to a specific group based on custom field selected
I'd like to assign a user to a custom group instead a some standard Joomla group, based on a dropdown choice.
I've created a user group named "students". Then I added a new custom custom field for ...
0
votes
1
answer
34
views
How can I make it pssible for users to login and add their products?
I want to build a form for the users of my website to let them easily add their products in frontend page under the name of their shop.
To this end, which plug-in, component, or extension ...
3
votes
2
answers
653
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 ...
0
votes
1
answer
36
views
Component/software recommendation?
I want to know if you guys know of any good components or extensions which can perform the following:
I want a user to be able to submit a form, view this form and edit it when they require. Every ...
0
votes
1
answer
1k
views
How can I save multiple dynamic values using check boxes?
I have a form which fetches and displays data from two databases (sessions, students) and allows a curriculum manager to select different combinations of students and classes by clicking check boxes. ...
1
vote
0
answers
95
views
Joomla Calendar for versions >3.7
I'm trying to get a calendar form field to display without using XML. For previous versions, I called JHTML::_('behavior.calendar') and initialized it with Calendar.setup({args}) that would pass ...
0
votes
1
answer
329
views
Get ajax post data from another module in plugin
is it possible to catch ajax post data from another module in my plugin?
I'm using SimpleForm2 https://allforjoomla.ru/extensions/mod-simpleform2
So this module creates a form and pass post data via ...
3
votes
2
answers
61
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?
1
vote
0
answers
13
views
Change possition on Registration form of extra fiels added to users
I have added an extra field for membership number to Users but I cannot see how to specify where the field is displayed on the registration form. It comes as a separate section at the end after the ...
1
vote
2
answers
762
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();
$...
3
votes
2
answers
2k
views
Joomla! 3.8 - How to hide Publishing Tab in front end
My registered users can log in to see, create and edit only their own articles. This works fine. However, when a user creates or edits an article, the "Publishing" tab appears at the top with "Content"...
1
vote
1
answer
866
views
What controller does front end form data post to using a component
I have been using Joomla for the last couple weeks and it seems straightforward so far and I understand the code in examples. I've successfully created a custom module that displays on the front end.
...
1
vote
1
answer
595
views
Custom dynamic fields - SimpleXMLElement in model and data info fields
Good morning,
I have a question. I create my own fields in my own component. I'm using the "SimpleXMLElement" class. The form generates via getForm work perfectly:
$newfieldset = new ...
1
vote
2
answers
707
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
1
answer
86
views
Overriding layouts from your module
I have already copied the renderfield.php and renderlabel.php files from ~/layouts/joomla/form/ to ~/modules/mod_mymodule/layouts/joomla/form but the overrides don't seem to be recognised.
I have ...
2
votes
1
answer
804
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-...
1
vote
1
answer
760
views
Server side form validation always returns true
I am trying to validate the input of my form on server side, but I always get true from the validator. What am I doing wrong?
.../templates/customer_registration.xml
<?xml version="1.0" encoding="...
1
vote
2
answers
75
views
what component allows me to open a Virtual tour in a popup? [duplicate]
I'm trying to create a popup by modifying the source code through the editor.
the code is as follows:
<a href="#" onClick="window.open('mypage.htm','pagename','resizable,height=260,width=370'); ...
2
votes
3
answers
902
views
joomla loadFormData
I am new in Joomla component development. I have used this document to develop the component. In this document there is a function loadFormData in Helloworld model as below:
protected function ...
2
votes
1
answer
73
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' ...
3
votes
1
answer
74
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 ...
1
vote
1
answer
269
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 ...
0
votes
2
answers
3k
views
Editing the Joomla Login Form
I had installed a template from joomshaper.
I'm trying to edit the login form of it. I already try to overwrite the mod_login/.../default.html file, but the form used by the template is not being ...
1
vote
0
answers
44
views
How does com_contact caching work when it has a form token?
I've been looking into conservative caching recently and felt I'd got my head around it. However, when I added it to a site, I was surprised to see that the core component com_content caches forms. ...
0
votes
1
answer
71
views
How to create form on frontend
I am working on fof 2.4 project.
In that I need to create a form on frontend.
I have seen form in fof 3.0 in contactus sample component.
But my project is in fof 2.4
Any one created form on front ...
1
vote
0
answers
282
views
Joomla 3.5.1 - Ajax with PHP not send email [closed]
I'm having some problems with the action of an Ajax form.
Here is the Javascript:
<script type="text/javascript">
var $j = jQuery.noConflict();
$j(document).ready(function() {
$j(...
2
votes
1
answer
187
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=...
1
vote
2
answers
871
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
1
answer
220
views
JFormFieldList in Frontend -> Notice: Array to string conversion
I'm facing a strange problem. I'm trying to define a custom field for the frontend-view of my component like this:
defined('JPATH_BASE') or die;
jimport('joomla.form.formfield');
jimport('joomla....
0
votes
1
answer
685
views
How to get articles categories in config.xml - Categories / SQL form field type?
With this given category field I want to show the article categories.
<field name="import_category" type="category"label="test"
description="test"
extension="com_test" /&...
5
votes
3
answers
1k
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 ...
0
votes
1
answer
274
views
Make one of select fields required in a form
I have this form.
<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.keepalive');
JHtml::_('behavior.formvalidation');
JHtml::_('behavior....
2
votes
2
answers
695
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"
...
2
votes
2
answers
2k
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 ...
0
votes
1
answer
247
views
Joomla custom contact forms (e.g. subject)
I have several links on my page that should refer to a joomla contact form. I want to have automatically filled in email subjects to that contact form for each link.
I tried to solve it with get ...
0
votes
2
answers
399
views
Submit form to other url within Joomla! plugin
What I'm trying to achieve is auto submit a subscribe form (with specific user details) to my email provider (similar to mailchimp), when a new user register to my joomla site.
I already defined a ...
2
votes
1
answer
1k
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 ...
0
votes
1
answer
244
views
Ajax in custom handler on client side
Im making custom formular and for one field I need a username ajax validation.
I prepared a custom handler in jQuery:
document.formvalidator.setHandler('usernamecheck', function(value) {
jQuery("...
7
votes
1
answer
2k
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,...
2
votes
1
answer
275
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 ...
3
votes
1
answer
2k
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....