Hi
1. Is the form saved to the SharePoint? If so then look at this link
http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=607&SearchTerms=filename
2. If the form is not saved then save InfoPath form using its fields as filename in share point.
get the text box value Using Xpath and then save that value as filename on
submit
code in c#:
IXMLDOMNode Value = thisXDocument.DOM.selectSingleNode("XPATH");
string fileName = Value.text;
Look at these threads may help more to answer your question...
http://infopathdev.com/forums/topic.asp?TOPIC_ID=416
http://infopathdev.com/forums/topic.asp?TOPIC_ID=1074
http://infopathdev.com/forums/topic.asp?TOPIC_ID=361
http://infopathdev.com/forums/topic.asp?TOPIC_ID=1342
Madhuri
http://www.ggktech.com