1 Reply Latest reply on Feb 4, 2011 9:25 AM by littledrew_1

    PHP (php site assistant)- conditional value lists and portals

    littledrew_1

      Title

      PHP (php site assistant)- conditional value lists and portals

      Post

      Hi,

      I've sorted through most of this problem, but here's the setup... I have conditional value lists in a portal. The condition resides in the parent table. Basically, parent::location determines who appears in child:names. I know that the value in parent::location must be submitted for values in child::names to appear.

      So, how do i code it so that, after submitting the location, they're taken back to edit in the portal fields?

      Also, is there a way to have a blank portal row appear after one row is completed without submitting?

      I'm just hoping someone knows PHP really well here. Thanks!

        • 1. Re: PHP (php site assistant)- conditional value lists and portals
          littledrew_1

          I figured it out myself, its probably not the most elegant solution, it gets the job done. Let me know if you run into the same problem...

          There's a block of code in the browserecords.php that the editrecord.php submits to. The code in browserecords.php commits the data to filemaker.

          So now, i have the "add page" just have one field, the parent::location select. Which then submits to editrecords.php Now that the parent::location has been commited to the database (because i took the code from the browse page and put it in the editpage) the conditional value list works. I added an "onchange" modifier to the last field in the portal. So when that last field is changed, the form submits to the editpage (itself) and adds another row. I also found/used some javascript so that when the user hits the "save" button at the bottom of the form they will be taken to the browserecords page. In actuality, everytime they modify the portal row, the record is saved. I had to use some javascript to change the "action" field of the form, so that the users wouldn't hit the "save" button at the bottom and be taken back to the editpage, thinking nothing has happened. By being sent to the browse page after hitting the "save" button, they think it's submitted like how a form normally is.