Jump to content


Photo

PHP Input Text Area Size?


  • Please log in to reply
12 replies to this topic

#1 Five360

Five360

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 15 April 2013 - 12:45 AM

Hey guys,
 
I am new the forum and generally PHP itself. I am using a modified version of a webpage I found for a project of mine.
 
I have the following code:
 

        $tbl->addRow();
        $tbl->addCell('Shipping Address: ', 'label');
        $tbl->addCell(
            $frm->addInput('text', 'address', '', array('size'=>36) )
            , null, 'data', array('colspan'=>3)
         );
        
    $tbl->addRow();
        $tbl->addCell('Titles: ', 'label');
        $tbl->addCell(
            $frm->addInput('text', 'title', '', array('size'=>36) )
            , null, 'data', array('colspan'=>3)
         );
 
Now what I have done is essentially copied the email input and pasted it twice and re-named it Shipping Address & Titles.
 
Now this works and everything when submitted, but for the user it still shows a box small enough for just the e-mail. I was wondering how I could re-size the text area for shipping and titles so that they fit appropriately.
 
Thanks in advance,
Five 360
 
PS.
 
I am not trying to advertise whatsoever, I just feel it would be MUCH easier to understand what I am talking about if you could see for yourself. Therefore I have added a link to the page below:
 
<spam removed>

Edited by trq, 15 April 2013 - 06:34 AM.


#2 trq

trq

    Advanced Member

  • Administrators
  • 30,921 posts
  • LocationSydney, Australia.

Posted 15 April 2013 - 06:35 AM

I suggest you find out what framework it is your application is using and find a forum that supports it.

The code you have posted isn't stock standard PHP.

http://thorpesystems.com | http://proemframework.org | http://github.com/trq

SmtpCatcher - A very simple mock sendmail useful for testing PHP mail scripts.
OPM - My Linux package manager.


#3 Five360

Five360

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 15 April 2013 - 05:48 PM

Could you please look at the demo?

 

I could post the rest of the code.



#4 Jessica

Jessica

    This is not my name.

  • Gurus
  • 8,982 posts
  • LocationDallas, TX
  • Age:26

Posted 15 April 2013 - 08:34 PM

Did you try changing 36 to something bigger?
My goal in replying to posts is to help you become a better programmer, including learning how to debug your own code and research problems. For that reason, rather than posting the solution, I reply with tips and hints on how to find the solution yourself. See below for useful links when you get stuck.

How to Get Good Help: How to Ask Questions | Don't be a help vampire
Debugging Your Code: Debugging your SQL | What does a php function do? | What does a term mean? | Don't see any errors?
Things You Should Do: Normalize Your Data | use print_r() or var_dump()
Lulz: "Functions should not have side effects." - trq

Please take a look at my new PHP/Web Dev blog: The Web Mason - Thanks!!

#5 Five360

Five360

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 15 April 2013 - 08:54 PM

Yeah, that changes the horizontal length.

 

I am trying to make it vertically bigger.



#6 Jessica

Jessica

    This is not my name.

  • Gurus
  • 8,982 posts
  • LocationDallas, TX
  • Age:26

Posted 15 April 2013 - 08:58 PM

Then you need a textarea not an input.
My goal in replying to posts is to help you become a better programmer, including learning how to debug your own code and research problems. For that reason, rather than posting the solution, I reply with tips and hints on how to find the solution yourself. See below for useful links when you get stuck.

How to Get Good Help: How to Ask Questions | Don't be a help vampire
Debugging Your Code: Debugging your SQL | What does a php function do? | What does a term mean? | Don't see any errors?
Things You Should Do: Normalize Your Data | use print_r() or var_dump()
Lulz: "Functions should not have side effects." - trq

Please take a look at my new PHP/Web Dev blog: The Web Mason - Thanks!!

#7 Five360

Five360

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 15 April 2013 - 10:50 PM

Thanks, I am half way there now. I just need to learn how to make it bigger? And also remove the text "array" from the box.



#8 Jessica

Jessica

    This is not my name.

  • Gurus
  • 8,982 posts
  • LocationDallas, TX
  • Age:26

Posted 16 April 2013 - 09:21 AM

I suggest you find out what framework it is your application is using and find a forum that supports it.

The code you have posted isn't stock standard PHP.


My goal in replying to posts is to help you become a better programmer, including learning how to debug your own code and research problems. For that reason, rather than posting the solution, I reply with tips and hints on how to find the solution yourself. See below for useful links when you get stuck.

How to Get Good Help: How to Ask Questions | Don't be a help vampire
Debugging Your Code: Debugging your SQL | What does a php function do? | What does a term mean? | Don't see any errors?
Things You Should Do: Normalize Your Data | use print_r() or var_dump()
Lulz: "Functions should not have side effects." - trq

Please take a look at my new PHP/Web Dev blog: The Web Mason - Thanks!!

#9 Five360

Five360

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 17 April 2013 - 05:10 PM

 

I suggest you find out what framework it is your application is using and find a forum that supports it.

The code you have posted isn't stock standard PHP.

 

 

Yes, but how does that help a PHP newbie?

 

If someone could actually give me some quality help I would really appreciate it. Here is a link to the PHP code I am using: http://www.dyn-web.c...rm/example2.php



#10 trq

trq

    Advanced Member

  • Administrators
  • 30,921 posts
  • LocationSydney, Australia.

Posted 17 April 2013 - 05:14 PM

I'm not sure what part of "The code you have posted isn't stock standard PHP" you don't understand?

How are we supposed to help you if we don't know anything about the third party library it is your using?

The link you pointed to has little to no documentation. That is your problem.

http://thorpesystems.com | http://proemframework.org | http://github.com/trq

SmtpCatcher - A very simple mock sendmail useful for testing PHP mail scripts.
OPM - My Linux package manager.


#11 Five360

Five360

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 17 April 2013 - 10:58 PM

I'm not sure what part of "The code you have posted isn't stock standard PHP" you don't understand?

How are we supposed to help you if we don't know anything about the third party library it is your using?

The link you pointed to has little to no documentation. That is your problem.

 

I don't quiet understand how a preview and a download link to the complete code isn't enough to help me. I guess I came to the wrong forum for PHP help...

 

Thanks anyways guys.



#12 Five360

Five360

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 18 April 2013 - 02:00 PM

Could the mod/admin who moved the topic please justify the decision to move a help related topic to the third party application forum?

 

ROFL.



#13 Jessica

Jessica

    This is not my name.

  • Gurus
  • 8,982 posts
  • LocationDallas, TX
  • Age:26

Posted 18 April 2013 - 02:14 PM

Do you really not understand that the code you're working with is NOT CORE PHP? What are you confused about? You are asking for help with third-party code, which unfortunately for you appears to have no documentation.

Try looking for the functions you're having trouble with in the PHP manual. You won't find them. We can't help you because we can't see all the code that you're working with.
My goal in replying to posts is to help you become a better programmer, including learning how to debug your own code and research problems. For that reason, rather than posting the solution, I reply with tips and hints on how to find the solution yourself. See below for useful links when you get stuck.

How to Get Good Help: How to Ask Questions | Don't be a help vampire
Debugging Your Code: Debugging your SQL | What does a php function do? | What does a term mean? | Don't see any errors?
Things You Should Do: Normalize Your Data | use print_r() or var_dump()
Lulz: "Functions should not have side effects." - trq

Please take a look at my new PHP/Web Dev blog: The Web Mason - Thanks!!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com