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 684679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:50:36+00:00 2026-05-14T01:50:36+00:00

I have a really silly problem that has cost me a load of time

  • 0

I have a really silly problem that has cost me a load of time already.

I have created a content template with a URL in there. When I look at the HTML code for it, I see a big fat “maxlength=256” in the form tag. I’d like to expand the length of this field, because my customer wishes to enter really long links (over 500 characters). Any idea how I can change it? When I do a generic search through the code I see so many occurences of 256, but the length might just as well be in the database somewhere. I have of course made the database field a longer varchar (1024 sounded poetic to me), so that’s something I don’t have to worry about.

I think it’s silly, but the customer’s always right, as we know.

I am using Drupal 6.14.

  • 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-14T01:50:37+00:00Added an answer on May 14, 2026 at 1:50 am

    Yahoooooo! I fixed it, thanks to the helpful Drupal pages:
    http://drupal.org/node/300705

    I figured out I could edit the form after it has been generated completely. The solution presented by Erik is good, but doesn’t appear to work for CCK fields. In my case Erik’s solution could have worked if it wasn’t for this generation step that needs to happen first.

    My new code is as follows:

    function longerfield_form_alter(&$form, &$form_state, $form_id) {
          $form['#after_build'][] = 'longerfield_after_build';
        }
    
    function longerfield_after_build($form, &$form_state) {
      // This is for a node reference field:
      $form['field_page_boeken'][0]['data']['url']['#maxlength'] = 1024;
      return $form;
    }
    

    Now, I too see that it’s ugly, especially because there might be other form elements here (just increment from 0), but it works for the first element! Yippeee!

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

Sidebar

Related Questions

We’ve found that the unit tests we’ve written for our C#/C++ code have really
I have a web application that fetches a lot of content via ajax. For
I've never really used MS server or anything like that before, i have, however
I have a very silly doubt in NHibernate. There are two or three entities
Okay, I'm kinda stuck on really silly problem, but still can't figure out. I'm
New to this, so sorry if it's really silly. My problem is as follows.
I have really basic question. How can I get form id by input element
I have really no idea why I'm asking this as this a really completely
Im new to iPhone development and I have really taken this to me. I
I've got a program where a lot of classes have really complicated configuration requirements.

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.