The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 89 posts ]  Go to page Previous  1, 2, 3
Author Message
PostPosted: Sun Apr 05, 2009 4:51 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Apr 03, 2009 11:21 am
Posts: 7
For some reason it is now passing the information I created in the new field to the database. Any help would be greatly appreciated.


Top
 Profile  
 
PostPosted: Sun Apr 05, 2009 5:10 pm 
Joomla! Ace
Joomla! Ace

Joined: Thu Jul 10, 2008 2:51 am
Posts: 1284
gametopius wrote:
For some reason it is now passing the information I created in the new field to the database. Any help would be greatly appreciated.


With no frame of reference here, how do you expect help? ;)

You have added fields to the registration form and they are storing in the database .... what do you need help with specifically?

_________________
http://nodwell.net
http://cjeweb.com
Custom Web Development & Joomla! Templates


Top
 Profile  
 
PostPosted: Sun Apr 05, 2009 5:19 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Apr 03, 2009 11:21 am
Posts: 7
jnodwell wrote:
gametopius wrote:
For some reason it is now passing the information I created in the new field to the database. Any help would be greatly appreciated.


With no frame of reference here, how do you expect help? ;)

You have added fields to the registration form and they are storing in the database .... what do you need help with specifically?



I have added a Last Name field to the registration page, and have modified all of the php files listed. Yet when a user enters in their Last Name it does not show that information in the database, or when I look at their account in the back end. So it seems that information is not getting passed on.


Top
 Profile  
 
PostPosted: Sun Apr 05, 2009 5:25 pm 
Joomla! Ace
Joomla! Ace

Joined: Thu Jul 10, 2008 2:51 am
Posts: 1284
Did you include the field in the insert statement to create a new user?

_________________
http://nodwell.net
http://cjeweb.com
Custom Web Development & Joomla! Templates


Top
 Profile  
 
PostPosted: Sun Apr 05, 2009 5:27 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Apr 03, 2009 11:21 am
Posts: 7
jnodwell wrote:
Did you include the field in the insert statement to create a new user?


In what file is the insert statement located?


Top
 Profile  
 
PostPosted: Mon Apr 06, 2009 2:00 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Nov 14, 2006 3:29 am
Posts: 221
This would be handy if it didn't modify core files. ;)


Top
 Profile  
 
PostPosted: Mon Apr 27, 2009 1:37 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Apr 26, 2009 1:53 am
Posts: 5
Hello jtullous,

I posted a thread on how to add additional columns, feed them and show their data on webpage. Then, I saw your thread and using the method you told, my issue was resolved seamlessly ........... Thanks!

However, a new issue is to be addressed. I have created additional fields in the tables of sections, content and categories and have also added corresponding form fields and variables to handle them.

Now, when I edit an article, category or section, the data additional that I fed is not loaded in Edit mode. Also, when I make a copy of an article, the copied article does not have the additional data and the fields remain empty in the DB table.

Can you please tell me how to handle these 2 problems?

Thanks.


Top
 Profile  
 
PostPosted: Thu May 07, 2009 10:31 pm 
Joomla! Intern
Joomla! Intern

Joined: Sat May 02, 2009 10:13 am
Posts: 72
Dear guys, this is realy useful discussion.

can any one help me in how can i create a user group? and make a two diffrent registration forms one for each user group.

I know that it can be in one registraters/users form and registrant choose the group from a drop down menu, but the next fields will depened one the group he will choose so i think it will be complicated to be done in one form.


Thanks


Top
 Profile  
 
PostPosted: Sun May 17, 2009 10:47 pm 
Joomla! Intern
Joomla! Intern

Joined: Sat May 02, 2009 10:13 am
Posts: 72
Dear guys,

I want to make a new registration form, so i have two (the original one and the new one) and i will create its fields it is easy as i will link it to the same table just will add some fields in the sencond form.

if this will be difficult, i want a drop down menu in the registration form, so according to user choice the input field appear or change.

Hope someone could help.


Thx,


Top
 Profile  
 
PostPosted: Fri Jun 05, 2009 9:33 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Fri Oct 10, 2008 11:01 am
Posts: 127
HI i am a little confused ...

can someone describe the steps for inserting two drop downfields in registration form ?
age and sex are the fields


Top
 Profile  
 
PostPosted: Tue Jun 16, 2009 2:24 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Jun 16, 2009 2:18 pm
Posts: 3
I have used this excellent answer for a checkbox, but if the checkbox is unticked ie Null the msg doesn't display any value. If it's ticked then it displays 1. How can I make it display 0 if the checkbox is unticked?


Top
 Profile  
 
PostPosted: Thu Aug 20, 2009 5:03 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Aug 19, 2009 7:29 am
Posts: 17
Hi People

I have read this post and I have done the following

1. I added the feild to the jos_users table using the code
Code:
ALTER TABLE jos_users ADD address VARCHAR (100) NOt NULL ;


2. I also edited the user.php in libraries/joomla/database/table/user.php
I added a variable var $address = null; under the peice of code var $username = null;
3. I also edited the files components/com_user/views/register/tmpl/default.php
and added the peice of code:
Code:
<tr>
   <td width="30%" height="40">
      <label id="addressmsg" for="address"><?php echo JText::_( 'Address' ); ?>:      </label>   </td>
     <td>
        <input type="text" name="address" id="address" size="40" value="<?php echo $this->user->get( 'address' );?>" class="inputbox required" maxlength="50" /> *     </td>
</tr>

and in components/com_user/views/user/tmpl/form.php id added the code for address feild as
Code:
 
<tr>
   <td width="120">
      <label for="address">
         <?php echo JText::_( 'Address' ); ?>:
      </label>
   </td>
   <td>
      <input class="inputbox" type="text" id="address" name="address" value="<?php echo $this->user->get('address');?>" size="40" />
   </td>
   
</tr>



Now my the newly added feilds do get displayed in the registration form but when I click the register button the values are not stored in my database

I am using Joomla 1.5.6 and Xampp

I tried using UserMeta is works fine but it does not get aligned with feilds already there in the form previously. no documentation is available on the same.

So can anyone help me ??


Top
 Profile  
 
PostPosted: Thu Aug 20, 2009 6:08 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Aug 24, 2008 4:44 pm
Posts: 17
Location: Grand Prairie, TX
Have you verified that table column is there? I had issues once with not telling it the AFTER command. example: ALTER TABLE jos_users ADD business VARCHAR (100) NOT NULL AFTER name;

See if that is it.


Top
 Profile  
 
PostPosted: Thu Aug 20, 2009 6:11 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Aug 24, 2008 4:44 pm
Posts: 17
Location: Grand Prairie, TX
Anyone been sucessful in doing drop downs and Check boxes? I think I got the check boxes to work but still doing testing on it. I use the check boxes to flag people that want to a mailing list or exisiting customer works but has it moments. Still working the bugs out on it.


Top
 Profile  
 
PostPosted: Fri Aug 21, 2009 4:30 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Aug 19, 2009 7:29 am
Posts: 17
Hi,

Yeah I tried it that way but still no effect


Top
 Profile  
 
PostPosted: Fri Aug 21, 2009 6:15 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue May 22, 2007 9:18 am
Posts: 43
Location: Ahmedabad
Its really good post.

Thanks

_________________
http://www.gadhavitechnologies.com <------- Outsource your Joomla work
Hire Joomla Designer / Developer / SEO (Let me know if we can't use this)


Top
 Profile  
 
PostPosted: Wed Oct 21, 2009 11:15 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Wed Oct 21, 2009 11:02 am
Posts: 4
Thank you for all the comments on this forum.. it just made my day....
Just in case someone got confused with the multiple posts.. here is the entire steps organized:
To add a combo box or any other field to the default registration from :

1- Go to the database and add the new field to the Jos_users table (set it to null as other records might not have values)

2- In the libraries\joomla\database\table\user.php after the :
var $params = null; line
add your field(s) for example:
var $phone = null;
var $country = null;

3- In the components\com_user\views\register\tmpl\default.php :
(a) Add the combo validation on top under the password validation function the entire script should be:

<script type="text/javascript">
<!--
Window.onDomReady(function(){
document.formvalidator.setHandler('passverify', function (value) { return ($('password').value == value); } );
document.formvalidator.setHandler('comboverify', function (value) {
if (value==" ") { return false;
} else { return true; }
}
);
});
// -->
</script>

(b) add the additional rows based on how many fields you have added, for my example it was the phone and country... (one text field, one combo box) the html should look like this :

<tr>
<td height="40"><label id="Phonemsg" for="phone">
<?php echo JText::_( 'phone' ); ?>:</label>
</td>
<td> <input type="text" name="phone" id="phone" size="40" value="<?php echo $this->escape($this->user->get( 'phone' ));?>" class="inputbox required" maxlength="50" /><span class="error"> *</span>
</td>
</tr>
<tr>
<td height="40"> <label id="countrymsg" for="country">
<?php echo JText::_( 'Country' ); ?>:</label>
</td>
<td>
<select style="width: 270px;" id="country" name="country" class="inputbox required validate-comboverify">
<option value="" <?php if ($country == "") echo "selected=\"selected\""; ?>>-select-</option>
<?php
// added by http://www.sallyahmed.com
$countryArray = array("England","Northern Ireland","Scotland","Wales",
"United States","Germany","Ireland","Canada","Other");

foreach($countryArray as $county) {
echo "<option value=\"" . $county . "\"" .
($county == $this->user->get( 'country' ) ? ' selected="selected"' : '') .
">" . $county . "</option>";
}
?>

</select>
<span class="error"> *</span>
</td>
</tr>

NOTE: I have diverted from the post on top, the use of id and class
should be in the select tag not the option tag....
4- save and upload the files , you can see the code working on this page: http://www.prisymid.com/register.html

Similar changes can be made in:
components\com_user\views\user\tmpl\form.php adding the additional fields and including the script for the combo validation on top...

Thank you again for the great post...

Regards,
Sally Ahmed
Online Marketing - Developer
Free flash animation


Top
 Profile  
 
PostPosted: Thu Nov 19, 2009 4:32 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Nov 16, 2009 4:40 am
Posts: 34
Hey... does someone know how i can add some fields that appends into one?

For example, i want the fields:

"pet name" [text box] - "type" [dropdown] - "colour" [textbox] - "eyes colour" [textbox]

And there will be at least ten clones.

And on database i want this formatting (on "pets" collumn).

pet name,type,colour,eyescolour|pet name,type,colour,eyescolour|...

So i can easily "explode" the data and print it properly

I tried to append them on both user.php and form.php but i can't figure out how to make it actuall "work".


Top
 Profile  
 
PostPosted: Thu Nov 19, 2009 7:14 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Nov 16, 2009 4:40 am
Posts: 34
OMG! I fugured it out!!! :D :D hahahahahaha

The answer is: controller.php! Just get all the needed vars there and then set them as you wish! :D


Top
 Profile  
 
PostPosted: Tue Nov 24, 2009 6:20 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Nov 24, 2009 6:12 am
Posts: 1
Hi all....

WOW thanks a lot for the all your ideas.

i have need to get help for the following problem. any help is greatly appreciated.

i have successfully add new fields to the registration page. but i need to add my own validation rule to it. how can i overcome this problem.

Thank you..


Top
 Profile  
 
PostPosted: Mon Nov 30, 2009 8:36 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Fri Aug 22, 2008 3:37 pm
Posts: 114
Location: India
This thread has been very helpful.

While going through this thread, I have ran through some doubts.

First my requirements, since I want to trace my referrals so I created an extra field in the Joomla Registration which is somewhat like this "Referral Username/Email". Since this is a referral, so I dont want to make this mandatory.

1. I want to validate the input entered, if this is an existing email id or username of a member. How to use the Input class validations which is used for other joomla inputs in the form.php

2. I dont want to let the users edit this once this is entered, but they can see the value in it similar to the username field. How to achieve this?

3. I want to see this from the backed, so I edited this file
\Joomla\administrator\components\com_users\views\user\tmpl\form.php

But now I want to see this field in the user manager itself without going into the individual user details. I have read from some thread that we need to edit this file,
Joomla\administrator\components\com_users\views\users\tmpl\default.php

I tried to modify the above file but I am not getting any result.

Any help in this regard is welcome.

Thanks

_________________
To read something interesting, Visit
http://www.incubation360.com
Crystallizing Idiosyncrasies


Top
 Profile  
 
PostPosted: Tue Dec 08, 2009 1:38 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Wed Oct 07, 2009 6:01 pm
Posts: 1
this thread is very helpful... thanks to all experts here... all working great

also what if i want to put datas it different table and field

example:i will not use jos_user table, instead i will use table called 'table_details' inside 'field_info' ?
i think i'll just edit or add a process script that will Insert that information to that specific location but i don't know how to do it. is this possible? pls help thanks in advance

thanks in advance


Top
 Profile  
 
PostPosted: Sun Jan 10, 2010 10:53 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Apr 06, 2009 9:07 am
Posts: 5
May i ask if there is a way to edit the detail in the "edit detail" link when user login?

<tr>
<td class="key">
<label for="school">
<?php echo JText::_( 'School' ); ?>
</label>
</td>
<td>
<input class="inputbox" type="text" name="school" id="school" size="40" value="<?php echo $this-

>user->get('school'); ?>" />
</td>
</tr>

The value did show up in the edit detail page, but i couldn't change the value as there is no textbox or anything. Please advice.

Thanks!


Top
 Profile  
 
PostPosted: Sat Feb 06, 2010 1:15 pm 
Joomla! Intern
Joomla! Intern

Joined: Thu Dec 17, 2009 11:42 am
Posts: 65
Hi all just a quick question.

I have followed the instruction from the original post (1st post by jtullous) Thank very much by the way it was a great help.
I added in a new field in the registration form called county and it saves to the database which is great.
My question is what do I have to do to get the new field 'county' to show up in the User Manager Back end admin page?

Any help greatly appreciated
Ciaran


Top
 Profile  
 
PostPosted: Wed Feb 24, 2010 10:33 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Wed Oct 21, 2009 11:02 am
Posts: 4
ciaranc wrote:
Hi all just a quick question.

I have followed the instruction from the original post (1st post by jtullous) Thank very much by the way it was a great help.
I added in a new field in the registration form called county and it saves to the database which is great.
My question is what do I have to do to get the new field 'county' to show up in the User Manager Back end admin page?

Any help greatly appreciated
Ciaran


Hi Ciaranc, I have added the field to the user manager back end admin page by modifying this file:
administrator/components/com_users/views/user/tmpl/form.php
You should add sth like this:
<input type="text" name="county" id="county" class="inputbox" size="40" value="<?php echo $this->user->get('county'); ?>" />
If you need the new field to show in the users listing in the admin panel change this file:
administrator/components/com_users/views/users/tmpl/default.php

Let me know if you need more instruction... contact me through my site
Cheers,
Sally
http://www.sallyahmed.com


Top
 Profile  
 
PostPosted: Fri Mar 12, 2010 6:46 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Mar 04, 2010 9:46 am
Posts: 8
Thanks for this tut...

as far as i understand...
i can add any number of fields to the registration form....
what if i wanna add some jquery or javascript validation to the form should i do as i would have done in a normal php form...

create a .js file and link that file in the php...
Or there is some other way to do that here....?


Top
 Profile  
 
PostPosted: Wed Mar 17, 2010 11:29 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Jan 28, 2010 12:08 pm
Posts: 2
Hello,

great thread and usefull I´m shure.

My Question, where can I find the URL for the Link (Register) in the Loginbox.

I would use my own Form, who create easy with Fabrik (fabrik.com).

The main request was, to modify less corefiles. All works fine, without change any core file. Only the link to register would change in Corefile.

Thats OK for me. But, where can I find it ?
Mayby, any hints to do it.. my target URL is clear, a form in Joomla (as a link of a MainMenu).

Thanks in advance.


Top
 Profile  
 
PostPosted: Thu Apr 22, 2010 11:36 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Apr 22, 2010 10:45 am
Posts: 8
How do I go about changing the registration informatin to add more fields.

This is standard joomla 'Create An Account'
Registration
Name: *
Username: *
E-mail: *
Password: *
Verify Password: *
Fields marked with an asterisk (*) are required.
Register

I need to add like 20 more fields...


Top
 Profile  
 
PostPosted: Mon Apr 26, 2010 4:15 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Apr 26, 2010 4:07 pm
Posts: 1
Hello. Tanks a lot for your post. I modified my joomla files as you described and it work good!

I have only a problem. When I recive the confirmation email, I read only the 3 originalfields: name, User and email.

What is the file to modify?

Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 89 posts ]  Go to page Previous  1, 2, 3



Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group