KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

Getting user input from a form

 
Post new topic   Reply to topic    KiXforms Forum Index -> Starters Code Clinic
View previous topic :: View next topic  
Author Message
fatartty
KiXforms Novice
KiXforms Novice


Joined: 26 Jul 2008
Posts: 1

PostPosted: Sat Aug 02, 2008 12:40 pm    Post subject: Getting user input from a form Reply with quote

I am try to create a form that takes two pieces of user input and then uses this info to create a set of folders in various locations based on the users input.

I have created the code to do the actual writing of information but I cannot seem to get the form to accept the user input and then parse the info back to the undelying code.

I am very new to Kixforms but I have used Kixtart before.
Back to top
View user's profile Send private message Send e-mail
Mart
KiXforms Regular
KiXforms Regular


Joined: 03 Oct 2005
Posts: 57
Location: Rotterdam - Netherlands

PostPosted: Sat Aug 02, 2008 6:17 pm    Post subject: Reply with quote

If it are textboxes then you can get the text from it if you user the .text attribute.

Let say that there are two textboxes and the user typed FOO in the first one and BAR in the second textbox.
Doing something like this will get you FOOBAR.

Code:

;get the text from the textboxes.
$text1 = $textbox1.text
$text2 = $textbox2.text

;put the content of the first textbox into a variable and add the contents of the second textbox to the same variable.
$text = $text1 + $text2

;show the results
?$text


The code above is a bit long but it's clear.
The code below does just the same but is a bit shorter.

Code:

?$textbox1.text $textbox2.text

_________________
Mart

- He's chained forever to a world that's departed.....It's not enough, it's not enough - Sorrow by Pink Floyd.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Starters Code Clinic All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group