CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • A Profile Within a Membership Form, how to make Textareas on some fields?
Pages: [1]

Author Topic: A Profile Within a Membership Form, how to make Textareas on some fields?  (Read 5864 times)

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
A Profile Within a Membership Form, how to make Textareas on some fields?
August 06, 2008, 07:44:17 pm
Hello, I have a Profile that I am using as part of a Membership/Donate form.  I would like to make a couple of fields "textarea" to allow for larger text input and better usability. 

How can I make the profile give certain fields a textarea as opposed to a regular <input type=text ?

Thanks!

Try CiviTeacher: the online video tutorial CiviCRM learning library.

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: A Profile Within a Membership Form, how to make Textareas on some fields?
August 06, 2008, 11:57:08 pm
You can create custom data of type "Note" and then add it to the Profile.

Kurund
Found this reply helpful? Support CiviCRM

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: A Profile Within a Membership Form, how to make Textareas on some fields?
August 10, 2008, 03:13:13 pm
Thanks, what if I have a custom field already populated with data that is "Text". 

How can I turn it to a "Note"? 

Currently I do not see a way to do that with the admin interface on 2.0.5.

Stuart

Try CiviTeacher: the online video tutorial CiviCRM learning library.

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: A Profile Within a Membership Form, how to make Textareas on some fields?
August 10, 2008, 11:26:01 pm
Stuart:

Nope, its is not possible to do that. You will have to manually use sql to copy text data to newly created Note field.

kurund
Found this reply helpful? Support CiviCRM

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: A Profile Within a Membership Form, how to make Textareas on some fields?
August 21, 2008, 11:21:12 am
There has got to be a way within MySQL to change a field from Text to Note (or vice versa).  What would I look for in the schema if I wanted to change some things manually with MySQL.   Am I stuck?
Try CiviTeacher: the online video tutorial CiviCRM learning library.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: A Profile Within a Membership Form, how to make Textareas on some fields?
August 21, 2008, 11:57:42 am

i would do the following:

1. create a new custom field in the same custom group of type Note

2. in the db do an sql copy from the old 'Text' to the new 'Note'. you might need to do some type conversion to copy from varchar -> blob

3. drop the field of type 'Text'

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: A Profile Within a Membership Form, how to make Textareas on some fields?
October 27, 2008, 11:59:00 am
@Lobo -- Hi, I am revisited this issue and trying to convert a TEXT field into a NOTE.   I have created the new note field, but you mention doing a "sql copy" of the text data into the note data.  In what table do I want to do this?   I scoured around for a little while but it wasn't clear where the actual data for this custom field lives.  Help?
Try CiviTeacher: the online video tutorial CiviCRM learning library.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: A Profile Within a Membership Form, how to make Textareas on some fields?
October 27, 2008, 10:18:47 pm

1. do a 'show tables' in mysql shell

2. find the table which has a pretty close match to your custom group name (it will be named civicrm_value_GROUP_NAME where GROUP_NAME is your custom group name)

3. you will have to do your custom copy in the two columns in that table

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: A Profile Within a Membership Form, how to make Textareas on some fields?
October 31, 2008, 01:19:56 am
Thanks this worked well.

For posterity's sake and to help others here is the SQL statement I used to copy the columns within the table:

Code: [Select]
UPDATE `civicrm_value_1_foo` SET field_new=field_old ORDER BY id

There was no data conversion necessary, as selecting a Note field in CiviCRM 2.0.x seems to correspond to a MySQL column of type 'text' -- not a 'blob' as you thought.
Try CiviTeacher: the online video tutorial CiviCRM learning library.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • A Profile Within a Membership Form, how to make Textareas on some fields?

This forum was archived on 2017-11-26.