Changing existing Text Box's to RTB's - InfoPath Dev
in

InfoPath Dev

Changing existing Text Box's to RTB's

Last post 05-26-2009 10:36 PM by martinkeatings. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 06-25-2006 06:20 PM

    • Carlos
    • Top 500 Contributor
    • Joined on 01-25-2006
    • Australia
    • Posts 31

    Changing existing Text Box's to RTB's

    Hi all,

    I have 4 BIG forms with text box's which, now require the benfits of a RTB. My form is connected to an SQL DB. I have so many text boxes that it will be a fairly big task to change them individually as they also have conditions/Rule in some. My question is, how can I change the TEXT Box's into RTB's format without having to delete each text box and re-create them in RTB format? Surely theres got to be a blanket way of doing this?

    Cheers,
  • 06-25-2006 07:01 PM In reply to

    Re: Changing existing Text Box's to RTB's

    Hello Carlos

    Follow the following steps

    Open the Datasource and Double click on the Fields(textboxes)
    In the Properties window change the datatype to Rich Text(XHTML)
    Now select the same text box in the design view and right click with your mouse
    Select Change To Rich Text box

    I hope this will help you.
    Kalyan G Reddy
    Infopath MVP 2007 and 2008
  • 06-25-2006 10:20 PM In reply to

    • Carlos
    • Top 500 Contributor
    • Joined on 01-25-2006
    • Australia
    • Posts 31

    Re: Changing existing Text Box's to RTB's

    Thanks K, but the Data Type field (which displays 'simple text') is greyed out. I cant see any option to change this, It is greyed out on both the DataSource property for that field and the text box property. Any ideas on how to overcome this?
  • 06-25-2006 11:00 PM In reply to

    Re: Changing existing Text Box's to RTB's

    Hi,

    This will happen for secondary datasources, you can not change the data type for a field, which is a secondary datasource.
    You can change data Type for main data connection fields.

    if you want change data type for secondary dataSources, you can change in your secondary datasource(like Xml, database etc..)

    Thanks.


    K.Ramana Reddy / http://www.ggktech.com
    India.
  • 06-26-2006 09:53 PM In reply to

    • Carlos
    • Top 500 Contributor
    • Joined on 01-25-2006
    • Australia
    • Posts 31

    Re: Changing existing Text Box's to RTB's

    Yes, its not a secondary source, its the main source. I click on the data source field, go to properties and see the data type greyed out. I dont understand why this would be dissabled?
  • 06-26-2006 10:09 PM In reply to

    • Carlos
    • Top 500 Contributor
    • Joined on 01-25-2006
    • Australia
    • Posts 31

    Re: Changing existing Text Box's to RTB's

    Found a similar thread on here:

    http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=106&SearchTerms=simple,text,rich,text

    Is this still the case where RTF does not gel with SQL?
  • 06-26-2006 10:14 PM In reply to

    • Carlos
    • Top 500 Contributor
    • Joined on 01-25-2006
    • Australia
    • Posts 31

    Re: Changing existing Text Box's to RTB's

    Heres a newsgroup post for this topic:

    From the microsoft.public.infopath newsgroup http://channel9.msdn.com/ShowPost.aspx?PostID=18725):

    "It is not possible to bind a rich-text box to a field from a database.

    This is because InfoPath uses XHTML to store formatted text. There is no datatype in a database that matches XHTML. If you were to insert XHTML into a database field and then query it from InfoPath, InfoPath would have no way of knowing that the data was supposed to be XHTML. Consequently, it would display the XHTML tags as well as the text. In similar fashion, if other data consumers tried to read the XHTML field from the database, they would see the HTML tags. To avoid confusion, InfoPath doesn't allow rich-text controls to be bound to database fields."---Joel Alley,MCSD"

  • 07-04-2006 08:11 AM In reply to

    Re: Changing existing Text Box's to RTB's

    Hi Carlos,

    I came into the same trouble quite a few weeks ago that I can´t bind a rich-text box to a data field from a secondary data source.

    I have contacted an employee from Microsoft directly and he has sent me the following link. I haven´t done it by now as I don´t understand the technique behind the scenes ;-((.

    Please have a look here

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_ip2003_ta/html/office_infopath_using_datasets.asp

    --- specifically the "Rich-text Fields" heading.

    Maybe this issue could be a "How to" on this site made by the real experts... ;-)

    Let me know if this can help you.
    Karsten
  • 05-26-2009 10:36 PM In reply to

    Re: Changing existing Text Box's to RTB's

     Oh i like that. one person has put a link on here to another thread and the end solutiion is a link back to this thread. Anyway! there is a cheeky solution to this problem in infopath. Its not a rich text box but it is the next best thing if you want a multiline input.

     

    Step 1: create a standard text box for the field in question

    Step 2: click the base of the text box in question and drag it so its height increases to the desired sized and it looks like a rich text box.

    Step 3: double click on the text box in question so it opens the properties box

    Step 4: goto the tab marked "display"

    Step 5: You should see tick box options for "Multi-line", "Paragraph Breaks" & "Wrap Text". Click all three.

    You should now see that it acts very much like a rich text box as an input.

Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.