February 13, 201312 yr 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
February 13, 201312 yr 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
February 13, 201312 yr 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(' ', ' ',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
February 13, 201312 yr Author This thread on this forum explain exactly the same problem as mine. http://fmforums.com/forum/topic/84649-formatting-value-list-in-an-entry-form-one-value-per-line/ Martin
February 13, 201312 yr Author Wait! I found the solution! I've edited the code for the function GetInputChoices in the fmview.php file and it worked! Martin
February 13, 201312 yr 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