PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Text field cut off after 201 characters

  1. hegeman
    Member

    I use the function RGFormsModel::get_leads($form_id) to retrieve form entries. I loop trough this with a foreach function and than echo the field content using something like $entryfield['field_id']. This all works fine except for one thing.
    In a text field the content get's cut off after 201 characters. The content is in the database, it just does not show up.
    What can I do to make it show?

    Thank you

    Posted 11 years ago on Thursday August 16, 2012 | Permalink
  2. The longer text fields are stored in the rg_leads_long table. You probably want to use this function:

    [php]
    get_field_value_long($lead, $field_number, $form, $apply_filter=true)

    It's defined in forms_model.php around line 2431 if you'd like to take a look at how it works.

    Posted 11 years ago on Thursday August 16, 2012 | Permalink
  3. hegeman
    Member

    Thanks for your response Chris. I have come a long way now using this function. One additiional question... is there a way to make it show the paragraphs that are in the field. Now it's just one big block of text...

    Posted 11 years ago on Thursday August 16, 2012 | Permalink
  4. I'm guessing that there are just carriage returns in the paragraphs, and those need to be converted to HTML. Try the nl2br function before you echo the value:

    [php]
    echo nl2br($entryfield['field_id']);
    Posted 11 years ago on Thursday August 16, 2012 | Permalink
  5. hegeman
    Member

    Hi Chris,

    Perfect, that simple line did it. Thanks a lot for pointing this out.
    You've been a great help.

    Thanks, Han

    Posted 11 years ago on Wednesday August 22, 2012 | Permalink
  6. Thanks for the update Han

    Posted 11 years ago on Wednesday August 22, 2012 | Permalink

This topic has been resolved and has been closed to new replies.