Jump to content

This topic is 7442 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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

  • 3 months later...
  • 4 weeks later...
Posted

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

  • 2 weeks later...
Posted

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~

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.