Hot answers tagged

19

The AHA! moment - #__content no longer has the params column, so the following adjustments have to be made for the plugin to work with components/tables with attribs instead of params (which appears only to be #__content as of v3.2): Change the fields name to "attribs" Change the fieldset name to something unique (I used the plugin name) Add a language ...


5

Make sure that your form has an ID field. Without the ID field, Joomla! will create a new record, even when editing. It is okay if the ID field is hidden.


5

Every folder inside the following folder is a plugin for Tiny-MCE editor: /media/editors/tinymce/plugins/ They are: advlist anchor autolink autoresize autosave bbcode charmap code colorpicker compat3x contextmenu directionality emoticons example example_dependency fullpage fullscreen hr image importcss insertdatetime layer legacyoutput link lists media ...


4

These buttons are coming from the editors XTD plugins. The defaults XTD buttons are article, pagebreak, readmore, image. But there are extensions that can install their own XTD buttons, e.g Joomla Works Simple Image Gallery Pro, or NoNumber Content Templater etc.. Check in the plugin manager for the Editor's plugin to see what's there. But I think I ...


4

I think you will need onContentPrepareForm() for that, then you can load your fields in it. Here is a good tutorial how to make it. To attach a js onclick event to the submit form, you will need to override form template and put your JS code inside.


4

Though the XML file and the rendered HTML both call them attributes, there is not a direct pass through of values. Hence, only some attributes make it to the HTML (and some extra attributes are added). All of this is based on the class that you can see here: https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/form/fields/text.php#L163 So for ...


4

The required="required" is standard HTML5 validation, - the html5fallback.js is just a polyfill for those browsers that do not support html5 validations. To answer your question add novalidate to your <form> markup: <form novalidate> .... </form> This turns off html5 validation.


4

You are doing it completely wrong. Never make core changes to files/classes because there are big chances that you will lose everything on the next CMS update. Instead use plugins. It is the best way to extend core functionality. What you need here is a simple profile plugin. Read the tutorial Creating a profile plugin. And if you use a standard list field ...


4

Answering my own question... I should have spend some time in google before asking my question. Joomla supports CSRF anti-spoofing and it is explained in How_to_add_CSRF_anti-spoofing_to_forms Since I am using GET method I should use the below while forming the HRF <?php echo JRoute::_( 'index.php?option=com_example&controller=object1&task=...


3

Most probably your article editor (TinyMCE?) is cleaning up your code. This is expected behavior by default. Both <iframe> and <form> are among the tags that are removed automatically by TinyMCE. There are a couple of ways around this: Use Sourcerer, a plugin that lets you add HTML (and other kinds of code) directly inside your articles. There's ...


3

To answer the actual question, this code will give you a listbox of UserIDs and Names. Retrieving all the extra data would then just be a SQL select statement $myGroupID = 2; //Your User Group to list $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('a.id as value, a.name as text'); $query->from($db->quoteName('#__users')....


3

FoF has a handy _csrfProtection routine in the controller, with several ways to check the token: JUtility::getToken() (for Joomla 2.5, removed from Joomla 3.x) $session->getToken() $session->getFormToken() or, the _token field in any of the previous instances https://github.com/akeeba/fof/blob/development/fof/controller/controller.php#L3308


3

The following classes can be added to your input field in order to control the size: class="inputbox input-mini" class="inputbox input-small" class="inputbox input-medium" class="inputbox input-large" class="inputbox input-xlarge" class="inputbox input-xxlarge" The size="45" parameter seems to be overridden by the CSS class .inputbox, forcing the width to ...


3

I have recently encounters an extension JxiForms which is pretty unique in its functionality. You should give it a try if you need complete control over the form data. It does not interfere in the form creation and handles form data processing when form is submitted. With this extension you are totally free to place your form code, no additional script is ...


3

You should use a session to save the form data. In the CMS there is a special User State for this. Just before you return false you should save the current data into the user state: // Save the form data in the session JFactory::getApplication()->setUserState($this->option . '.edit.authorization.data', $postData); $this->option here is the name of ...


3

Yes this is possible but is a major work around. Joomla has two required verification events. One in he browser and the other on the server just before saving of the form. The browser is the easy part to bridge, the server-side verification is more tricky. I add an extra hidden field called "not_required" to my form and use this to send the fields not ...


3

The best place is your table class before storing data. For example below code in store function of table class. public function store ($updateNulls = false) { if ($table->load(array('alias' => $this->alias, 'catid' => $this->catid)) && ($table->id != $this->id || $this->id == 0)) { $this->setError(JText::_(...


3

I have had similar issues in the past where scripts seem to be stripped regardless of the text filter settings. Temporarily Disable Editor As a temporary work around, you can temporarily set the Default Editor to "None" each time you edit the content. This works but is not convenient especially when you or another administrator forgets to disable the ...


3

I think you want to use use getOptions(..) not getInput(...) with a JFormFieldList. getInput returns the full <select /> input as a string. getOptions populates the select options with an array of <option /> strings.


3

Everything you need to get started with JForm for views https://www.ostraining.com/blog/how-tos/development/getting-started-with-jform/


3

Have you tried to use Subform field?. It allows you to nest XML forms inside each other or reuse your existing forms inside your current form. And your need, you can combine it with showon attribute.


3

The short answer is: you will need the assistance of a Joomla Programmer as it's highly improbable you'll find a plug-in that suits your requirements. First of all, I think what you are looking for is properly called an 'adaptive survey' or 'adaptive questionnaire,' (not be confused with 'responsive/adaptive as pertaining to screen-size - so even Googling ...


2

Why do you waste your time writing code for a contact form? There are a lot of Joomla forms extensions available. Fabrik is such an example. You can create as many fields as you like. Visforms is another example.


2

No, all of your folders should be set to 755 and files should be set to 644. With Joomla, the only file that should ever need to be different (optional) is your configuration.php file which can be set to 444


2

Yet another suggestion for an existing Extension...the work has already been done for you by 74 different developers at the JED Contact Forms section. They range from very simple to very complexed, and many are very highly rated. If for some unbeknownst reason these don't meet your needs and you feel it necessary to build your own, I'd suggest Component ...


2

This is a list of the available Joomla events: http://docs.joomla.org/Plugin/Events As I don't know what exactly you're trying to do you might just want to browse the list and see if anything sounds suitable to you. You could then just use the event handler in your plug in. If you need any explanation as to how to use these events just let me know Edit:...


2

Is it possible hat you submit your form with the "GET" method? Because JSession::checkToken only validates against "POST" method, you have to use JSession::checkToken('get') or die(); if you like to check the GET requests.


2

This is not the direct answer to your question, it is more for information and to give you some basic direction. It seems that you do not have full understanding of how things work, and why you can't add html in the fields there. The fields you are trying to add html, are not designed to accept html. Furthermore, even if they would allow some html, I am not ...


2

Another solution is not to use JToolBar at all. Do really need it? Simply make your button like this ("Cancel" button for example): <button type="button" class="btn" onclick="Joomla.submitbutton('contact.cancel')"> <span class="icon-cancel"></span>&#160;<?php echo JText::_('JCANCEL') ?> </button> Then in JS: Joomla....


2

It seems, that this is a problem of Joomlas custom JToolBar, which is used here to create a Toolbar for the front end. see last paragraph: https://docs.joomla.org/Client-side_form_validation The problem is, that the work around of this article does not work! Meanwhile I found the problem. If you have a closer look to the button code, which will be ...


Only top voted, non community-wiki answers of a minimum length are eligible