Part of the EllisLab Network
   
 
Form Initialization and the Validation Class
Posted: 25 July 2008 02:59 PM   [ Ignore ]  
Lab Assistant
Avatar
RankRank
Total Posts:  105
Joined  09-12-2007

Here is the flow. I have data in the database. It needs editing. I want to populate a form, then let the user submit changes (if any), validate those changes and update the database.

How can I initialize $this->validation->formElementName?
Here is some pseudocode

if first load
    $this
->validation->formElement1 = "someData";
else
    
call validation sequence;

Any ideas or comments are appreciated.

UPDATE = I posted in the wrong portion of the forum. Sorry.

 Signature 

Voltamp Media
Web: PHP, MySQL, PERL, HTML, CSS, Python, Javascript
Linux: FreeBSD, OpenVPN, SMB, SVN, C, Shell

Profile
 
 
Posted: 28 July 2008 04:24 PM   [ Ignore ]   [ # 1 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  199
Joined  07-28-2008

I had the same question and came across this:

http://www.sellersrank.com/codeigniter/using-the-code-igniter-validation-class-to-set-default-form-values/

 Signature 

~ 4 All the Right Reasons ~

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 719, on June 06, 2008 10:16 AM
Total Registered Members: 62604 Total Logged-in Users: 17
Total Topics: 77091 Total Anonymous Users: 2
Total Replies: 416307 Total Guests: 178
Total Posts: 493398    
Members ( View Memberlist )
Newest Members:  wengbaoshanGenki1gabewellsGlaucoeudj1nsehartEasyMLance SloanandrewjhscottShuvo
Active Members:    bri@ncahvarnoDark PreacherdodmoGenki1j0hanKoolavyMiragerobertcsmithrussegbseinfeldsharpestensistooptdktank59vendiddyZac G.