Jump to content

Recommended Posts

I'm helping a friend with a website he had built. I have little to no knowledge of php and very little html.

 

He had a database built where you enter information on one page. name, phone, etc. And the entered data is transferred to sortable table (grid?) on an admin page.

 

The problem we are having is: when you enter a phone number, 111-111-1111, the last two digits don't show up on the admin side. It shows as 111-111-11.

 

I'm not sure if all the data isn't getting transferred? or will the column width on the admin page not allow that many characters.

 

Any help would be great and I can supply code if I need to.

Link to comment
https://forums.phpfreaks.com/topic/287692-help-with-column-width/
Share on other sites

You can see the complete text on the input field. The problem is on the admin page, which is where this data goes. If a number is entered as 123-123-1223 on the input page, it shows up as 123-123-12 on the admin page.

 

There is so much code, I don't even know where to begin. What's the best way to get this code posted on here?

I do have access to the database. I've changed (what I thought) would fix the issue on both the input page and the admin page.

 

Here's copy of some of the code on the input page. There are many places for the phone number field where there are max length settings, this is just one.

 

            // View column for PhoneNumber field
            //
            $column = new TextViewColumn('PhoneNumber', ' Phone Number ', $this->dataset);
            $column->SetOrderable(true);
            
            /* <inline edit column> */
            //
            // Edit column for PhoneNumber field
            //
            $editor = new TextEdit('phonenumber_edit');
            $editor->SetSize(14);
            $editor->SetMaxLength(14);
            $editColumn = new CustomEditColumn('PhoneNumber', 'PhoneNumber', $editor, $this->dataset);
            $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
            $editor->GetValidatorCollection()->AddValidator($validator);
          
            $column->SetEditOperationColumn($editColumn);

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.