change field type text to text area

13 years 3 months ago - 13 years 3 months ago #152899 by richiebee
change field type text to text area was created by richiebee
is there a way to change field type text to text area in field manager?

without re-creating the field and losing all the data

or if not back up the data and reload...:ohmy:

Please Log in to join the conversation.

13 years 3 months ago - 13 years 3 months ago #153006 by heyai
Replied by heyai on topic Re: change field type text to text area
Let's see. If you have database access you could try:

Backup your site or at least your database!
Create the new text area field.
Go to your database manager (probably phpmysql and perform a query consisting of your comprofiler table (probably jos_comprofiler) your old field name and your new field name:
INSERT INTO jos_comprofiler (cb_newfield) SELECT cb_oldfield FROM jos_comprofiler;
Confirm that the data was copied over and delete the old field.

Or something like that.. like I said: Backup!

hey-ai - the community for asian guys and non-asian girls

The search bar is your friend, not just decoration!

Please Log in to join the conversation.

13 years 3 months ago #153090 by richiebee
Replied by richiebee on topic Re: change field type text to text area
Thanks heyai,

I have exported the database and also set up a development database separate from the my sites,

then put

INSERT INTO jos_comprofiler (cb_test) SELECT cb_lastname FROM jos_comprofiler;

in the box "SQL query on database"

then I get an error You have to choose at least one column to display

I am not experienced in doing mysql queries

Is it possible give a step by step?

thanks again,

Please Log in to join the conversation.

13 years 2 months ago #153663 by richiebee
Replied by richiebee on topic Re: change field type text to text area
Hi I created a new field type editarea and does the job

then in mysql changed type medium to long text didn't lose any data...

however there seems to be a limit on how much text can be put in there how do we change the maximum limit fields in tab for area main?

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.194 seconds

Facebook Twitter LinkedIn