Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6696023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:17:31+00:00 2026-05-26T06:17:31+00:00

I have a field that is type text and I want to convert it

  • 0

I have a field that is type text and I want to convert it to type List (text) in Drupal 7. I can’t simply change the value, as it won’t let me, is there an easy way to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T06:17:32+00:00Added an answer on May 26, 2026 at 6:17 am

    There’s no easy way, no. As far as I can tell these are the manual DB changes you’ll need to make:

    1. In field_config change the type column to ‘list_text’ and module column to ‘list’ for your field.

    2. Then you’ll need to change the serialised array in the data column to match that of a list type (it’ll have the settings for text types at the moment obviously). There’s no easy way to show you how to do it here, the best way would be to compare the serialised array with one for a different field of a list type, then you’ll be able to see what values you need to remove/change. The allowed_values array under settings will be where you put your list’s values. Once that’s changed, re-serialise it and put it back in the data column for your field.

    3. After that remove any columns from your field’s field_data and field_revision tables that begin with field_myfield_ but aren’t field_myfield_value (the list type still needs that column).

    4. Add an index to those tables for the value column.

    5. Clear your caches

    I must warn that’s completely untested it just seems to make sense looking at the table structures, it’d be a good idea to take a back up of the three tables you’ll be playing with just in case.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a text field that I want to save periodically as users type
I have field that it's not a key (it's text) and I want to
I have a search field, and using that single text box I want the
I have a Lucene index that contains documents that have a type field, this
I have a form and one of the fields is a check-all-that-applies type field
I have a struct that has a field called type How do i access
I have 3 similar tables, that would all have the same enum type field.
I have field X that contains text with spaces in the end of the
I have a field that I'm outputting text into after doing an nl2br(). I've
I have a ruby on rails application with an input text field that has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.