fmwebschool.com
Top Experts [learn more]Top 4-10
webko

9743 K
bandmandq

2458 K
Genx

1525 K
4. tcmeyers
5. kbata
6. Martie
7. Hammerton
8. rrenfrow
9. bneeman
10. plegler
Welcome, Guest. Please login or register.
October 25, 2014, 10:28:03 AM

Login with username, password and session length
Search:     Advanced search
FMWebschool releases more educational FMStudio webinars - check them out here:
http://www.fmwebschool.com/webinars.php
27808 Posts in 6153 Topics by 1525 Members
Latest Member: alkyred
* Home Help Search Calendar Login Register
+  fmwebschool.com
|-+  Recent Posts
Pages: 1 [2] 3 4 ... 10

 11 
 on: September 24, 2014, 10:25:02 AM 
Started by PhanMan - Last post by PhanMan
I am trying to have a repeating region display in more than 1 column. 

Michael Petrov posted this code on this page.  http://fmwebschool.com/frm/index.php?topic=614.0
Code:
<?php
echo "<table border=\"1\">\n";

$cols 3;     //Specify your cell column count here
$cell 0;

for(
$i=0$i<23$i++) {   //This line is usually replaced by foreach($result['data'] as $record( { 
   
if( ($cell $cols) == ) { echo "<tr>\n"; }

   
// CELL DISPLAY CODE START
   // This is where you would echo out your data from the record
   
echo "\t<td>cell</td>\n";
   
// CELL DISPLAY CODE END

   
if( (($cell+1) % $cols) == ) { echo "</tr>\n"; }
   
$cell++;
}
// The bit of code below makes sure to insert some extra cells if the last row is not completely filled with cells
if( (($cell) % $cols) != ) { 
   do {
      echo 
"\t<td>&nbsp;</td>\n";
      
$cell++;
   } while( ((
$cell) % $cols) != );
   echo 
"</tr>\n";
}


echo 
"</table>\n";
?>

Here is my repeating region code
Code:
<table align="left" "homeColumns1">
              <tr class="homeColumns1">
                <th  nowrap="nowrap"><div align="left"><em>Birthdays</em></div></th>
              </tr>
              <?php foreach($birthdays_result->getRecords() as $birthdays_row){ ?>
              <tr>
                <td nowrap="nowrap" class="homeColumns1"><div align="left"><a href="FM/Employees/employee_card.php?id=<?php echo $birthdays_row->getRecordId(); ?>" class="homeColumns1"><?php echo $birthdays_row->getField('FullName'); ?></a> - <?php echo date'jS'strtotime($birthdays_row->getField('Birthday'))); ?></div></td>
              </tr>
              <?php ?>
            </table>

I am not having any success trying to apply it.  Any help would be appreciated.  THanks

 12 
 on: September 24, 2014, 10:21:26 AM 
Started by Michael Petrov - Last post by PhanMan
Code:
<table align="left" "homeColumns1">
              <tr class="homeColumns1">
                <th  nowrap="nowrap"><div align="left"><em>Birthdays</em></div></th>
              </tr>
              <?php foreach($birthdays_result->getRecords() as $birthdays_row){ ?>
              <tr>
                <td nowrap="nowrap" class="homeColumns1"><div align="left"><a href="FM/Employees/employee_card.php?id=<?php echo $birthdays_row->getRecordId(); ?>" class="homeColumns1"><?php echo $birthdays_row->getField('FullName'); ?></a> - <?php echo date'jS'strtotime($birthdays_row->getField('Birthday'))); ?></div></td>
              </tr>
              <?php ?>
            </table>

I am having a hard time applying the code to Michaels example.  Any help would be appreciated.  thanks

 13 
 on: September 19, 2014, 01:50:26 PM 
Started by Mike Wallace - Last post by Mike Wallace
I am having problems with SuperContainer and am thinking about replacing it with FileMaker's external container fields.  There is a website that pulls a large amount of SuperContainer data currently and I don't want to switch over if all of that data is going to be pulled through the FileMaker server and web publishing engine.  Returning the url would be pretty light but the image itself could cause problems if the data flows through the web publishing engine when you use the url that is returned.

Does anyone know about this?

 14 
 on: September 19, 2014, 12:55:42 PM 
Started by glasstream2000 - Last post by glasstream2000
I was wondering if anyone has successfully got Dreamweaver CS 6 or CC to work with FM12 server, I keep getting either an undefined error or http 500 error when trying to define a connection.

I have tried to use the PHP API files that came with FM12 and put them in the root of the website, Hope that's right! I have tried my own install of php, not luck so far with that, just burning through VM's trying different things.

I would love to know if anyone has this working and how you did it, any certain things you might have done. It is a shame it doesn't seem like FMStudio is supported anymore ;(

 15 
 on: September 19, 2014, 11:43:56 AM 
Started by GManNAtl - Last post by GManNAtl
As a side note, I have been working on some cool stuff with Zurb and FMPHP in general. I have developed a dbase to generate Zurb List/Detail views, with full CRUD operations and full record auditing. You simply define the fields you want in list view and form view and it generates all the code required. I want to take it further than it's current state and AJAXify it some. If anyone is interested in working with me on this nights and evenings send me a PM.

Also, thanks to EVERYONE on this site and at FMStudio for the great help. When I started with FMStudio I was a complete novice with PHP. I can now say I have a very good knowledge of PHP in general. I can't imagine having learned it so well in any other way.

 16 
 on: September 19, 2014, 11:34:56 AM 
Started by GManNAtl - Last post by GManNAtl
I posted this as a reply to an old thread, but figured I would start a new thread to make this easier to find. For anyone interested this version returns the code needed for the built in pagination in zurb. It checks to make sure not to duplicate the first and last links, and places elipses where appropriate. I will likely enhance this to allow passing of the entire recordset to do the tooltips as well, but don't know when I'll get around to it. Anyway, here is how the pagination looks in Zurb.



And here is the code again.

Code:
<?php

// Enhanced NAVBAR based on FMStudio's Navbar, improvements written by Troy C. Meyers April 9 2008

function fmsDlxNavBar($name$settings) {
if(fmsGetPageCount($name) == 1) return;

// Settings example: 'First/;/Previous/;/Page%20#page#%20of%20#total#/;/Next/;/Last/;/%20--%20'
// $settings[0] - Text for First link
// $settings[1] - Text for Previous link
// $settings[2] - Text with substitute tags for current page indicator
// $settings[3] - Text for Next link
// $settings[4] - Text for Last link
// $settings[5] - Text for separator
// $settings[6] - Number of pages to show link for before and after current


$settings fmsDecodeAdvDialogValues($settings);

$sep $settings[5];

if(isset($settings[6])){
$scope $settings[6];
} else {
$scope 0;
}

// Current page number
$page fmsGetPage($name);

$total fmsGetPageCount($name);
$settings[2] = str_replace(array('#page#','#total#'),array($page,$total),$settings[2]);



$ret '<div class="pagination-centered"><ul class="pagination">';

// Prev link if appropriate
if($page != 1) {
$ret.='<li class="arrow"><a href="'.fmsPrevPage($name).'">&laquo;</a></li>';
} else {
$ret.='<li class="arrow unavailable"><a href="'.fmsPrevPage($name).'">&laquo;</a></li>';
}

// First link if appropriate
if ( ( $page $scope ) > ) {
$ret.='<li><a href="'.fmsFirstPage($name).'">1</a></li>';
}

// First elipses if appropriate
if ( ( $page $scope ) > ) {
$ret.='<li class="unavailable"><a href="">&hellip;</a></li>';
}

// Fill with nearby page links below
if(($page != 1) and ($scope 1)) {
$low_page $page $scope;
if($low_page 1$low_page 1;
for ($this_link_page $low_page$this_link_page $page$this_link_page++) {
$ret.='<li><a href="'.fmsPageURL($name$this_link_page, -1).'">'.$this_link_page.'</a></li>';
}
}

// Current page (of how many) indicator
$ret.= '<li class="current"><a href="">'.$page.'</a></li>';

// Fill with nearby page links above
if(($page != $total) and ($scope 1)) {
$hi_page $page $scope;
if($hi_page $total$hi_page $total;
for ($this_link_page $page 1$this_link_page <= $hi_page$this_link_page++) {
$ret.='<li><a href="'.fmsPageURL($name$this_link_page, -1).'">'.$this_link_page.'</a></li>';
}
}

// Last elipses if appropriate
if ( ( $total - ( $page $scope ) ) > ) {
$ret.='<li class="unavailable"><a href="">&hellip;</a></li>';
}

// Last link if appropriate
if( ( $page $scope ) <= ($total 1) ) {
$ret.='<li><a href="'.fmsFirstPage($name).'">'.$total.'</a></li>';
}

// Next link if appropriate
if($page != $total) {
$ret.='<li class="arrow"><a href="'.fmsNextPage($name).'">&raquo;</a></li>';
} else {
$ret.='<li class="arrow unavailable"><a href="'.fmsNextPage($name).'">&raquo;</a></li>';
}

return $ret.'</ul></div>';
}

?>


 17 
 on: September 19, 2014, 11:26:40 AM 
Started by Troy Meyers - Last post by GManNAtl
I have been using Zurb Foundation lately and wanted to use the pagination built into their library. So, I took this a touch further for anyone wanting to use this with Foundation.

Cheers!

Code:
<?php

// Enhanced NAVBAR based on FMStudio's Navbar, improvements written by Troy C. Meyers April 9 2008

function fmsDlxNavBar($name$settings) {
if(fmsGetPageCount($name) == 1) return;

// Settings example: 'First/;/Previous/;/Page%20#page#%20of%20#total#/;/Next/;/Last/;/%20--%20'
// $settings[0] - Text for First link
// $settings[1] - Text for Previous link
// $settings[2] - Text with substitute tags for current page indicator
// $settings[3] - Text for Next link
// $settings[4] - Text for Last link
// $settings[5] - Text for separator
// $settings[6] - Number of pages to show link for before and after current


$settings fmsDecodeAdvDialogValues($settings);

$sep $settings[5];

if(isset($settings[6])){
$scope $settings[6];
} else {
$scope 0;
}

// Current page number
$page fmsGetPage($name);

$total fmsGetPageCount($name);
$settings[2] = str_replace(array('#page#','#total#'),array($page,$total),$settings[2]);



$ret '<div class="pagination-centered"><ul class="pagination">';

// Prev link if appropriate
if($page != 1) {
$ret.='<li class="arrow"><a href="'.fmsPrevPage($name).'">&laquo;</a></li>';
} else {
$ret.='<li class="arrow unavailable"><a href="'.fmsPrevPage($name).'">&laquo;</a></li>';
}

// First link if appropriate
if ( ( $page $scope ) > ) {
$ret.='<li><a href="'.fmsFirstPage($name).'">1</a></li>';
}

// First elipses if appropriate
if ( ( $page $scope ) > ) {
$ret.='<li class="unavailable"><a href="">&hellip;</a></li>';
}

// Fill with nearby page links below
if(($page != 1) and ($scope 1)) {
$low_page $page $scope;
if($low_page 1$low_page 1;
for ($this_link_page $low_page$this_link_page $page$this_link_page++) {
$ret.='<li><a href="'.fmsPageURL($name$this_link_page, -1).'">'.$this_link_page.'</a></li>';
}
}

// Current page (of how many) indicator
$ret.= '<li class="current"><a href="">'.$page.'</a></li>';

// Fill with nearby page links above
if(($page != $total) and ($scope 1)) {
$hi_page $page $scope;
if($hi_page $total$hi_page $total;
for ($this_link_page $page 1$this_link_page <= $hi_page$this_link_page++) {
$ret.='<li><a href="'.fmsPageURL($name$this_link_page, -1).'">'.$this_link_page.'</a></li>';
}
}

// Last elipses if appropriate
if ( ( $total - ( $page $scope ) ) > ) {
$ret.='<li class="unavailable"><a href="">&hellip;</a></li>';
}

// Last link if appropriate
if( ( $page $scope ) <= ($total 1) ) {
$ret.='<li><a href="'.fmsFirstPage($name).'">'.$total.'</a></li>';
}

// Next link if appropriate
if($page != $total) {
$ret.='<li class="arrow"><a href="'.fmsNextPage($name).'">&raquo;</a></li>';
} else {
$ret.='<li class="arrow unavailable"><a href="'.fmsNextPage($name).'">&raquo;</a></li>';
}

return $ret.'</ul></div>';
}

?>

 18 
 on: September 14, 2014, 10:25:08 AM 
Started by louflis - Last post by louflis

If anyone is interested in the answer. I was able to find it. Here is it below.  Thanks

<?php
foreach(fmsValueListItems2($Vol_Web,'Profile','YES/NO',$new_volunteer_row->getField('crime_conviction'),null,"") as $list_item) {
  if(html_entity_decode($list_item[0]) == html_entity_decode($_POST['crime_conviction'])) {
    echo "<option value=\"{$list_item[0]}\" selected=\"selected\">{$list_item[1]}</option>\n";
  } else {
    echo "<option value=\"{$list_item[0]}\">{$list_item[1]}</option>\n";
  }
}
fmsValueListCustomChoice(null);
?>

 19 
 on: September 14, 2014, 10:23:27 AM 
Started by MBUST - Last post by MBUST
Hello everyone,

Given that no one seems to dare enough to test the system with the latest OS, I decided to take matters into my own hands, by volunteering my wife's iMac.   Grin

I updated her iMac (late 2012) 2.7 GHz Intel Core i5 (8 GB 1600 MHz DDR3 RAM) to OS 10.9.4.  The results were mixed: Dreamweaver CS5.5, FM Studio, and FileMaker Pro 11 Advanced, all run just fine.  My hesitation is with the speed.  There was something slowing down the machine a lot, but I don't know what it was, if it was related to these programs or not.  I have not tested them that much.  But I was able to create a page with FM Studio that generated a dynamic table and displayed well online. 

So at least at this level, it worked.  Speed may be a function of the machine (mine is a MacBook Pro running OS 10.6.8, 2.2 GHz Intel Core i7; 8 GB 1333 MHz DDR3, and all runs well and fast).

For the moment I have the system installed on my wife's computer, as she is traveling and won't return for a few days, but in a couple of days I will erase it and restore it all to her stuff. I doubt that I will do further testing, but if I do, I will report here again.

I hope this helps someone.

 20 
 on: September 07, 2014, 05:16:56 PM 
Started by louflis - Last post by louflis
Forum,

I solved number 1, the redirect issues. This line had a typo. I had a < in front of $new_volunteer_orientation instead of a . (period)
fmsRedirect('new_volunteer_orientation.php'.'?Profile_id='.$new_volunteer_row->getField('Profile_id'));

However I am still trying to solve number 2. Here is the issue. I have a php validation that when I submit a form and fail to fill in a field I get an error that for example Please enter First Name. However the fields that have filled in for example "Last Name" the fields still is populated. However drops downs do not retain the text, they are empty, even when I selected the drop down and populate the field.  Below is one of the drop downs, Can anyone tell me how I can make the code below retain the text. Thanks


<select name="volunteer_year_round" id="volunteer_year_round">
                    <?php
foreach(fmsValueListItems2($Vol_Web,'Profile','YES/NO',$new_volunteer_row->getField('volunteer_year_round'),null,"") as $list_item) {
  if(html_entity_decode($list_item[0]) == "") {
    echo "<option value=\"{$list_item[0]}\" selected=\"selected\">{$list_item[1]}</option>\n";
  } else {
    echo "<option value=\"{$list_item[0]}\">{$list_item[1]}</option>\n";
  }
}
fmsValueListCustomChoice(null);
?>
                  </select>

Pages: 1 [2] 3 4 ... 10
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!