Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Hi all!
 

I have a small problem, and I'm sure the solution is obvious, but I can't get it...

 

I have a field with a list of values. On the layout, the field is set to display values as radiobuttons.

 

In the php file « addrecord.php » (generated by the PHP Assistant), the values are written « back to back ». This make the web page cumbersome as the values appears in the same line (approx 10 values).

 

So, the question is : where (and how) in the addrecord.php file can I put some code to make the radiobutton appears one above the other, just like that :

 

Radiobutton 1

Radiobutton 2

Radiobutton 3

...

 

Thanks a lot !
 

Martin :)

Please post the code - there is most likely a foreach statement in there which can have a HTML break added to make them line up in the desired manner

  • Author

Yup!

 

I didn't had access to the computer while I wrote my first message... But now I do!

 

So here is the code that create the radiobuttons from the list vlaues of the FM database :

 

 

<tr class="field">
                                                    <td class="field_name">
                                                        <?php echo str_replace(' ', '&nbsp; ',htmlentities('Équipements',ENT_NOQUOTES,'UTF-8',false));?>
                                                    </td>
                                                    <td class="field_data">
                                                        <?php $fieldName = 'Équipements';?><?php $fieldValue =         $record->getField('Équipements', 0) ; ?><?php getInputChoices("radio", $layout->getValueListTwoFields('Equipements', (isset($master_record)) ? $master_record->getRecordId() : $record->getRecordId()), $fieldValue, getFieldFormName($fieldName, 0, $record, true, 'RADIOBUTTONS', 'text'), 'text', $submitDateOrder);?>
                                                    </td>
                                                </tr>
 

I did try to add a <br> somewhere (I'm guessing it should be near the $submitDateOrder variable), whitout any success...

 

Martin :)

  • Author

Wait!

 

I found the solution!

 

I've edited the code for the function GetInputChoices in the fmview.php file and it worked!

 

Martin :)

Which is good - until you actually want it all on a single line... This is why I dislike the API, you shouldn't need to edit a helper file to get the results you're after...

 

Anyway, good you have a solution

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.