Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2014
    Location
    Malaysia
    Posts
    23
    Plugin Contributions
    0

    Default Create Account: Change Single Line to Multiline or Paragraph

    Hello, I tried looking around in previous threads, but doesn't seem to find any solution.
    I am quite a beginner in this.

    I would like to change a single line form field in create account to multiline/paragraph.
    It's for address, rather than street address 1 and 2, I would like to combine all into one single paragraph.

    EDIT: I have changed the maximum word count in mysql to 800 words.

    Click image for larger version. 

Name:	Clipboard02aaaa.jpg 
Views:	41 
Size:	37.1 KB 
ID:	18998

    Please help.. thank you so much!
    Last edited by naczyls747; 22 May 2020 at 02:12 PM. Reason: added more details

  2. #2
    Join Date
    Jul 2012
    Posts
    15,096
    Plugin Contributions
    17

    Default Re: Create Account: Change Single Line to Multiline or Paragraph

    An example of such a field would be the comments block at the bottom of I think it is checkout_shipping, checkout_payment, and/or checkout_confirmation. Additionally, the field data type would need to be updated in the database for the orders table and at least one of the customer's tables.

    Question would be, how are things to be handled if all information is entered into a single line instead of the customer moving to the next line. Ie. Label printing/display, etc...?

    Also, I guess why is it desired to have all in one block instead of keeping the items separate?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  3. #3
    Join Date
    Feb 2014
    Location
    Malaysia
    Posts
    23
    Plugin Contributions
    0

    Default Re: Create Account: Change Single Line to Multiline or Paragraph

    Quote Originally Posted by mc12345678 View Post
    An example of such a field would be the comments block at the bottom of I think it is checkout_shipping, checkout_payment, and/or checkout_confirmation. Additionally, the field data type would need to be updated in the database for the orders table and at least one of the customer's tables.

    Question would be, how are things to be handled if all information is entered into a single line instead of the customer moving to the next line. Ie. Label printing/display, etc...?

    Also, I guess why is it desired to have all in one block instead of keeping the items separate?
    Thank you for your reply.. with my limited knowledge, I think you meant how will the data show up in my admin end and for label printing etc.. it's not exactly an issue, admin is only me viewing them.. as for label printing, I do it manually using edit this plugin: Export Shipping & Order Information. I dont think it will be an issue..

    The main reason why I would like to remove others is to lessen the things to fill up.. unfortunately, for the majority of users in my country, they prefer to fill up as little fields as possible when placing order..
    But the single line address is not very user-friendly when they fill up the whole address, ie, they can't exactly read (it as it is) what they have written (in case of typo, etc).

  4. #4
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    7,500
    Plugin Contributions
    8

    Default Re: Create Account: Change Single Line to Multiline or Paragraph

    Maybe it's just a matter of relabeling the form to match https://secureservercdn.net/45.40.14...ess-format.jpg
    Did you read the posting tips?!?
    Responsive Color Changes for 155-156c demo here.
    Zen Cart PCI Compatible Hosting

  5. #5
    Join Date
    Feb 2014
    Location
    Malaysia
    Posts
    23
    Plugin Contributions
    0

    Default Re: Create Account: Change Single Line to Multiline or Paragraph

    Quote Originally Posted by dbltoe View Post
    Maybe it's just a matter of relabeling the form to match https://secureservercdn.net/45.40.14...ess-format.jpg
    Thank you for the suggestion.. but I dont have issue with label printing.
    Just needed assistance to change the single line to multiline.. so that it's easier to read when filling in the form for account creation..

    Edit: as in increase the form field size.. to something like below:
    Click image for larger version. 

Name:	Clipboard02aaeee.jpg 
Views:	6 
Size:	39.2 KB 
ID:	18999
    Last edited by naczyls747; 23 May 2020 at 07:01 AM. Reason: added pic

  6. #6
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    955
    Plugin Contributions
    12

    Default Re: Create Account: Change Single Line to Multiline or Paragraph

    Quote Originally Posted by naczyls747 View Post
    Thank you for the suggestion.. but I dont have issue with label printing.
    Just needed assistance to change the single line to multiline.. so that it's easier to read when filling in the form for account creation..

    Edit: as in increase the form field size.. to something like below:
    I think what's confusing is the why! Input field type text depending on encoding and some other things can do up to 2 GB's... Which if one does you would have to figure out what to do with that data.. thus limiting to what you need is smart.

    So, input type text is only one line, you would need to change it to a text field
    normal line:
    Code:
    <label class="inputLabel" for="street-address"><?php echo ENTRY_STREET_ADDRESS; ?></label>
      <?php echo zen_draw_input_field('street_address', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_street_address', '40') . ' id="street-address" placeholder="' . ENTRY_STREET_ADDRESS_TEXT . '"' . ((int)ENTRY_STREET_ADDRESS_MIN_LENGTH > 0 ? ' required' : '')); ?>
    Modified line:
    Code:
      <label class="inputLabel" for="street-address"><?php echo ENTRY_STREET_ADDRESS; ?></label>
      <?php echo zen_draw_textarea_field('street_address',  '22', '7', ' id="street-address" wrap="virtual" placeholder="' . ENTRY_STREET_ADDRESS_TEXT . '"' . ((int)ENTRY_STREET_ADDRESS_MIN_LENGTH > 0 ? ' required' : '')); ?>
    Basically a text field 22 charters long and 7 rows high.. You well have to figure out if this makes a legal shipping address or not and chase down the field sanitizing.. For me it would not be worth it.. Helping users with accurate titles, inline help and inline samples is better.
    Dave
    Always forward thinking... MySite..

  7. #7
    Join Date
    Feb 2014
    Location
    Malaysia
    Posts
    23
    Plugin Contributions
    0

    Default Re: Create Account: Change Single Line to Multiline or Paragraph

    Quote Originally Posted by davewest View Post
    I think what's confusing is the why! Input field type text depending on encoding and some other things can do up to 2 GB's... Which if one does you would have to figure out what to do with that data.. thus limiting to what you need is smart.

    So, input type text is only one line, you would need to change it to a text field
    normal line:
    Code:
    <label class="inputLabel" for="street-address"><?php echo ENTRY_STREET_ADDRESS; ?></label>
      <?php echo zen_draw_input_field('street_address', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_street_address', '40') . ' id="street-address" placeholder="' . ENTRY_STREET_ADDRESS_TEXT . '"' . ((int)ENTRY_STREET_ADDRESS_MIN_LENGTH > 0 ? ' required' : '')); ?>
    Modified line:
    Code:
      <label class="inputLabel" for="street-address"><?php echo ENTRY_STREET_ADDRESS; ?></label>
      <?php echo zen_draw_textarea_field('street_address',  '22', '7', ' id="street-address" wrap="virtual" placeholder="' . ENTRY_STREET_ADDRESS_TEXT . '"' . ((int)ENTRY_STREET_ADDRESS_MIN_LENGTH > 0 ? ' required' : '')); ?>
    Basically a text field 22 charters long and 7 rows high.. You well have to figure out if this makes a legal shipping address or not and chase down the field sanitizing.. For me it would not be worth it.. Helping users with accurate titles, inline help and inline samples is better.
    It works but there's words inside..?
    Click image for larger version. 

Name:	Clipboard05aeror.jpg 
Views:	16 
Size:	33.7 KB 
ID:	19002

  8. #8
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    955
    Plugin Contributions
    12

    Default Re: Create Account: Change Single Line to Multiline or Paragraph

    Quote Originally Posted by naczyls747 View Post
    It works but there's words inside..?
    missed a line.. try this..
    Code:
     <label class="inputLabel" for="street-address"><?php echo ENTRY_STREET_ADDRESS; ?></label>
      <?php echo zen_draw_textarea_field('street_address',  '22', '7', '', ' id="street-address" wrap="virtual" placeholder="' . ENTRY_STREET_ADDRESS_TEXT . '"' . ((int)ENTRY_STREET_ADDRESS_MIN_LENGTH > 0 ? ' required' : '')); ?>
    Dave
    Always forward thinking... MySite..

  9. #9
    Join Date
    Feb 2014
    Location
    Malaysia
    Posts
    23
    Plugin Contributions
    0

    Default Re: Create Account: Change Single Line to Multiline or Paragraph

    Quote Originally Posted by davewest View Post
    missed a line.. try this..
    Code:
     <label class="inputLabel" for="street-address"><?php echo ENTRY_STREET_ADDRESS; ?></label>
      <?php echo zen_draw_textarea_field('street_address',  '22', '7', '', ' id="street-address" wrap="virtual" placeholder="' . ENTRY_STREET_ADDRESS_TEXT . '"' . ((int)ENTRY_STREET_ADDRESS_MIN_LENGTH > 0 ? ' required' : '')); ?>
    Thank you so much! It works!

 

 

Similar Threads

  1. v155 Change order of create account
    By spminis in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 9 Aug 2017, 03:58 PM
  2. Blank Line in Create Account file?
    By igendreau in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 15 Apr 2010, 02:48 PM
  3. How do I make Address line 2 compulsory in the create account form?
    By Liamv in forum Customization from the Admin
    Replies: 3
    Last Post: 3 Mar 2010, 09:12 PM
  4. Paragraph's Don't Line Up - Help Needed Please
    By DPM in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 10 Nov 2008, 04:36 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR