Newbies Aaron Graham Posted May 3, 2004 Newbies Posted May 3, 2004 I am having an issue modifying a repeatng field using FX, how would I set up the AddDBParam calls, do I 1.) send 1 AddDBParam with field name and an array 2.) multiple AddDBParam with same field name and a single value for each repition 3.) multiple AddDBParam with field name+[1...n] and a single value for each repition not sure if this is clear, but hopefully someone knows what I need... TIA
Newbies Aaron Graham Posted May 3, 2004 Author Newbies Posted May 3, 2004 I figured it out, have to use addparam(fieldName.index, value)
Addam Posted August 5, 2004 Posted August 5, 2004 Thank you for posting this. I was fighting with that all day! ~Addam~
Jul Posted September 3, 2004 Posted September 3, 2004 HI, I am having the same problem. How do you retrieve repeating values from the web page? I use the following code for 2 repaeting fields (7 repetitions): <tr>[FMP-Repeating: test1]<td><input type="text" value="[FMP-RepeatingItem]" name="field1"></td>[/FMP-Repeating]</tr> <tr>[FMP-Repeating: test2]<td><input type="text" value="[FMP-RepeatingItem]" name="field2"></td>[/FMP-Repeating]</tr> I can see my repeating values on the page and enter data into all the boxes, but how do I retrieve them in php page (I use combined CDML/PHP)? I tried AddParam('test1.1', 'field1') AddParam('test1.2', 'field1') ..... does not work Please HELP! Thank you very much! Jul
Addam Posted September 17, 2004 Posted September 17, 2004 Here is the deal... Repeating fields are translated (in so many words) to actuall arrays themselves. So if you have 1 repeating field with 3 entries, you would get their information by: $instance['repeatingfield'][0]; $instance['repeatingfield'][1]; $instance['repeatingfield'][2]; and so on... If you wanted to display a list you would use something like this: <?php for ($i=0; $i < count($instance['repeatingfield']) ; $i++){ echo $instance['repeatingfield'][$i]; } ?> This would return the list of values inside the repeating field. Hope this helps!! ~Addam~
Recommended Posts
This topic is 7442 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now