How to add extra fields in Joomla2.5 registration form? I am using profile plugin but i also want to change the order of the fields. Any Suggestion?
Copy the profile plugin and change it to do what you want, then install it and unpublish the old one.
You can add additional fields to the registration form by changing the database and a core component file.
First of all take a look of components\com_users\models\forms directory and there is a XML file called registration.xml. This is the file joomla creates the registration form fields. I hope you can understand this file and add what ever the necessary fields you want.
And after that check out your data base table called #__users and add the extra fields you want. (ex: if you want to add Telephone number add filed calld tp_no). And make sure to use the same name that you use in XML file "field name" for the database table column as well.
I imagine you are looking for something like this?
http://extensions.joomla.org/extensions/access-a-security/site-access/authentication/14303
Probably the safest solution in the short and long term. I've not used it but it looks like it does what you want and from an interface rather than changing hard code.
There is manual how do it. Turn on subtitles visit http://www.youtube.com/watch?v=a6xsKLiXF40
Related
I have a form on the portal which has some fields, those fields are all set to optional but on the portal they are required.
I don't know what makes them required.
There is no js code involved.
There are no business rules.
What should be the next thing I check ?
You should look for your Form in Dynamics. There in you can find Entity metada and it does have an option.
If not look directly under Form Options and there you will find Make All Fields Required
article for Reference
I need to build an application wherein the admin must be able to define forms for data entry. The data to be entered is unknown to me. But the system will need to be able to support all the possible form fields (minus hidden fields, I suppose). So text areas, text fields, radios (with ability to specify what the options are), checkboxes, etc. Also, it needs to be able to support line item entries (similar to EE’s Matrix plugin).
Obviously, I don’t want to try to build this from the ground up. Are there any libraries I can use in CI to make life easier for me?
If none exist, what are some database design patterns I should consider for such a problem?
The best database-design for this is the Entity-Attribute-Value Model. For use with a FORM, essentially your form is the ENTITY, the Attribute will have a type (used for deciding how input will be captured, and data interpreted). Make sure that you index properly.
Remember that you'll only need to data to change the form, don't read from this model everytime you need to show a form. Store a flat file (.json is handy) of the finished form and read that when displaying the form.
this question might be a bit special. I am using this Joomla 2.5 extensions to give authors the abilty to add Attachments to articles: Joomla Attachments
The extension renders an input field called "description" in a backend form to insert an file description for the provided file. Unfortunately it´s not taking HTML tags which I need. By saving the form it seems a strip_tags() or preg_replace() or something similar cleans the input. I combed through the code of the attachments extension but couldn´t find a place where the input is cleaned or saved.
To hopefully stay in the Question + Answer rule of Stackoverflow:
Is there a class which extensions inherit from the Joomla Core to save form data to a DB-table ( which also could be responsible to clean and validate user input )?
thanks for any idea,
tony
You should see how the field is defined first:
1. Form definition
look into the
administrator/component/yourcomponent/models/forms/somename.xml
there you could find a form definition, if so it will also specify the field type: depending on the type there are several available filters; for example the default textarea will strip html, and you need to set
filter="raw"
in order to enable it. see http://docs.joomla.org/Standard_form_field_and_parameter_types for a list of fields, click and you can find the available format options.
2. model
If the model inherits from JModelAdmin or JModelForm or other JModel* it will automatically handle binding of the forms' data to the database, look for the Save function which should receive the form $data.
3. more
There are at least another dozen possibilities. If the above didn't help, try finding the form: possibly you could find it just by looking at the markup. Once you have the form, check the following fields:
option
task
view
This should help you find the php code that is invoked based on the form:
if view is set, maybe in ./views/someview/view.html.php you could find the saving logic.
if task is set, look for a function with the same name in ./controller.php
if task contains a ".", look for the controller in the ./controllers/ folder.
if option is not the name of your component, your component is sending the data to another component for saving, and most likely set a return-url
I made a component with a "file" field type, but the content of that single field are not passed at all, I was under the impression it should save the file name as text at least, if I change the field type to "text" the name saves so I know everything else is functioning. All the other fields are being passed. What am I doing wrong?
File handling aside, I just want it to save the name.
A detailed explanation would be appreciated, or even better, can I get someone who knows what he's doing re-write this component using MVC so I can compare.
Thanks
Can't really help with what you have so far as you haven't provided any code, however our website have recently made a small simple component for Joomla 2.5 for file uploading using the SWFUpload framework, should you want to use it.
http://joomjunk.co.uk/products/component-home/swfupload.html
Renting houses can be nasty so I need to automate it. Please, have a look at here. If you make a mistake, all of your changes are gone. I tried to insert the values in the url like:
https://www.hoas.fi/web/hak_inet.nsf/WebHakemus?OpenForm&02.07?PersonFirstName=Alex?PersonLastName=Smith
but it does not work. What is the problem?
Firstly, your query string is incorrect. It should be:
https://www.hoas.fi/web/hak_inet.nsf/WebHakemus?OpenForm&02.07&PersonFirstName=Alex&PersonLastName=Smith
Secondly, in order to pre-populate the page with the results of the query string, the developer of the page would have had to added logic to extract the query string values and pre-populate the page with those values. In this case, it does not appear that they have done that.
You could try saving the page locally as HTML. Then you could modify the HTML to include your default values. You would also need to update any relative paths to point to the server as a full URL. Then you could open the page on your machine and hopefully post to the server. This assumes that they are not injecting any session or other temporary information in the page that they validate.