Idea for developpment - InfoPath Dev
in

InfoPath Dev

Idea for developpment

Last post 08-25-2005 11:08 PM by Coita Thierry. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 08-17-2005 07:55 AM

    Idea for developpment

    Hi,

    I need of your feedbacks!

    What I have to do is that:

    the user can choose in list of text one text it populate one richtextbox.

    And all this text have multiple field that the user can fill out! for example:

    the ^ is green eat ^ and like to ^.

    ^ is where the user has to enter the information

    What is the best way to make this!

    I know that we can't say to infopath that go on a place in a field so:

    What I want to make is that :

    my richtextbox

    and under depends on the number of field need the sentence I put a reapeating section with one field

    the user enter the information in each field after click on the button and with C# I add the content of the field in the right place of the richtextbox.

    Do you think it's a good idea? Have you other idea?

    Any help is appreciate!

    Thanks

    ++

    Thierry

    Every moment hesitated is a moment gone for life!!! Think about it
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 08-17-2005 01:30 PM In reply to

    Hi Thierry!
    Might be hard to do Rich Text control, but we have done several things like this. I'll ask Greg to respond with details.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 08-17-2005 03:18 PM In reply to

    My first question is what are you ultimately trying to do with this? Do you actually need these values in a Rich Text Box, or can you just display them inline, using Expression Boxes, in the view? The view would be a static version of the text you are trying to insert these values into.

    Secondly, yes, you can do what you want... but you will need to do some research into how InfoPath creates the contents of a rich text box. You can do this by creating a blank form and adding a rich text box to it, then publishing, filling out the form and saving it. Then look at the .xml file it created and see what kind of HTML structure is built inside the rich text field. You'll need to duplicate this yourself.

    In your above example, it didn't look like you needed rich text at all. It looked like plain text would work fine... but maybe that was just for your example.

    Anyway, one of the above 2 choices should work for you. It will require some research and work to make it happen. Good luck!

    Greg Collins [InfoPath MVP]
    InfoPath Dev
  • 08-17-2005 11:08 PM In reply to

    Hi Patrick and Greg,

    Thanks for your interest!
    quote:
    My first question is what are you ultimately trying to do with this?

    The goal is store this sentence with the word that user have insert into a database (the xml of result is send to a webservice and the webservice make the insert in the database (Tamino)).

    So the idea is that : User choose his modele and insert the words that are required! And I need to return all the sentence!
    quote:
    Do you actually need these values in a Rich Text Box, or can you just display them inline, using Expression Boxes, in the view?

    Not necessary in a the Rich Text Box but the problem is that I have a lot of modeles (about 30 sentences can be choose) and have a expression box for each and after hide all that you don't need It's a little bit complicated and can slow up my form!

    I have only to show this text the user can't modify it! only the word to insert can be fill out by the user!

    But it's a good idea I don't have think to this possibility! I have another field with 5 modeles so I think I use this possibility!
    quote:
    Secondly, yes, you can do what you want... but you will need to do some research into how InfoPath creates the contents of a rich text box.

    Yes I have make and my idea it's to put some markup (not html markup but markup that I have choose) where I have to insert my text so that can be easily insert in the Rich Text Box (I hope).If that don't work like I want I think I will try with a normal text box!

    Any other idea?

    Thanks in advance

    ++

    Thierry

    Every moment hesitated is a moment gone for life!!! Think about it
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 08-24-2005 02:06 AM In reply to

    Hi,

    What I want to do now is a dropdown list box select all the kurz tag(see XML under) when the user select a models infopath populate the RTF (rich text field)with text tag and under I have a reapeating section who make the number of row base on the model needs. For example:

    user has select : eat

    the model is: the ^ eat ^. ^ is what user can enter

    so 2 row is create with one textbox in each.

    User enter his text in the 2 textbox and after I have to put my 2 text in my model!

    So I have think for do that insert in the RTF:

    I have seen on infopath (in a different form: it's a general remarks) when you modify the xml generate by infopath (you open this xml with XMLSpy for example) and in the rich text box you can put some tag no XHTML and when you launch your xml modified with the template, infopath make no error and if you modify this RTF infopath don't remove the tag that you have created (with XMLSpy)!

    for example BB is not a XHTML markup but infopath don't make an error:

    <my:group4>
    my:field9>Zur Eintragung in <BB xmlns="http://www.w3.org/1999/xhtml">dafdshregister</BB>
    wird Folgendes angthierry <font style="BACKGROUND-COLOR: #ffff00"
    xmlns="http://www.w3.org/1999/xhtml">This text has a yellow highlight.</font></my:field9>
    </my:group4>


    So I'm asking if I can in my model add some markup and so the text can be insert very easily!

    I hope you understand!

    --------------------------------------------------------------------

    I have make some test but it appear that:

    My first try was with only XHTML markup for see what it happens!

    When I bind the secondary datasource (who contains the models with formating like a highlights)to RTF (rich text field) in my reapeating section the tag is lost and no formating in my xml:

    my source XML:

    <tabMuster xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Amt="0">
    <Muster lang="1" fldID="235">
    <Kurz>Eintrag</kurz>
    <Text>Zur Eintragung <font color="#ff0000">in das </font> Handelsregister <strong
    xmlns="http://www.w3.org/1999/xhtml">wird</strong> Folgendes angthierry <div xmlns
    ="http://www.w3.org/1999/xhtml"><font style="BACKGROUND-COLOR: #ffff00">This text has
    a yellow highlight.</font></div></Text>
    </Muster>
    ...
    ...
    </tabMuster>


    The text appear but no formating. I have read this but that don't help me:
    http://www.infopathdev.com/howto/tips/default.aspx?i=1edbf4486498484b8b828fd605262a4f


    xml generate by infopath:

    ...<my:group3>
    <my:group4>
    <my:field9>Zur Eintragung in das Handelsregister
    wird Folgendes angthierry This text has a yellow highlight.</my:field9>
    </my:group4>
    </my:group3>...


    Why? what I have to do for that infopath can keep my RTF formatting?

    I think it's the same kind of probleme for this topic but i'm not sure(If it's the case I have answer to it but my answer was not correct like I see now):

    http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=733

    Thanks for your help support feedbacks or what you want I'm totaly lost!

    ++

    Thierry

    Every moment hesitated is a moment gone for life!!! Think about it
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 08-25-2005 05:06 PM In reply to

    One question that i have is can you enter Rich text into this field? What happens when you enter text with the same formatting as above does the text in the node look the same or are there any differences?

    One reason i can think of is that even though the field is a rich text field - its not mapped to a rich text field in the view but to a expression box or something similar. That could cause this issue.

    Shanthi
    InfoPath Dev India
    Shanthi Reddy
  • 08-25-2005 11:08 PM In reply to

    Hi Shanthi,

    Thanks for your help!

    I dont' think that is the reason! Because if in my form I put in my rtf some text and I do some formatting when I send the xml it contain the formatting and if try to open my form on double click on my xml the formatting is not loose!

    So I think that my RTF is "good"!
    the declaration in my custom schema is :

    <xs:complexType name="RichTextType" mixed="true">
    <xs:sequence>
    <xs:any namespace="http://www.w3.org/1999/xhtml" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>


    So I don't understand why that make me this!

    Another idea is to make an ActiveX control. I have take some information and like I see (and somebody say to me)I can make a control that is possible to jump between the ^ and highlighted the ^ so the user can enter the text to replace directly in the textbox!

    This things cannot be made with infopath because you can't navigate with the cursor and highlited some text in a text box or a RTF! It's the reason of an ActiveX control...

    Do you thinks it's a good idea!

    I search in all the way for find the best idea for make this control (in infopath or with ActiveX) so if you have any idea even a little post! I need of all idea!

    Thanks a lot!

    ++

    Thierry

    Every moment hesitated is a moment gone for life!!! Think about it
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.