Yii Framework Forum: Checking A Value During Form Submittal - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Checking A Value During Form Submittal Rate Topic: -----

#1 User is offline   enfield 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 288
  • Joined: 12-January 11

Posted 22 November 2012 - 06:32 AM

How can I verify against a value stored in the db during a form submittal?

Given the following tables:

Posted Image

In the multipage comment form, on the first page the user will select the product using an auto complete field. From here I am using the Wizard Behavior extension's Plot Branching Navigation to direct users to different additional pages of the form pending the "status" of the product they have chosen.

In order to do so I need to obtain the associated "status" for a given product to base the switch logic on in routing to additional pages.

How can I get this at that point in time in the form?
0

#2 User is offline   enfield 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 288
  • Joined: 12-January 11

Posted 24 November 2012 - 02:40 PM

Any ideas or guidance?
0

#3 User is offline   KonApaz 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,317
  • Joined: 21-February 11
  • Location:Greece

Posted 24 November 2012 - 02:56 PM

Hi enfield

In your Model you can override the beforeValidate function and check what ever you want either with CSqlDataProvider or with AR functions
Yii is the best php framework in the world!
find our demo Yii extension on www.webkit.gr
Is it post useful? please v++ ;)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users