Jump to content

jor133d

New Members
  • Posts

    7
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

jor133d's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Yeah, gosh, that was silly. I have it working now. You have been so helpful. PM me your paypal. At the very least I can buy you a beer, ha!
  2. I tried your code and all I seem to get is a blank document. Would you consider taking a look at my code? I can zip it all up for you. If you would consider this, how much would you charge? Thanks!
  3. Yes, they will always be in the same order and position. The titles can change to match the position if that is easier. Same with name, there is no real reason to have first and last name in different columns. There can be just one field for it called name.
  4. Is this what you are looking for? {"content":"{\"2\":{\"label\":\"\",\"value\":\"\",\"type\":null,\"validation\":null,\"required\":null,\"min\":null,\"max\":null,\"tooltip\":null,\"custom\":null,\"custom2\":null},\"3\":{\"label\":\"Based+on+your+most+recent+call+to+our+Call+Center%2C+how+likely+is+it+that+you+would+recommend+CitizensFirst+Credit+Union+to+a+friend+or+colleague%3F\",\"value\":\"10 (Very Likely)\",\"type\":\"radio\",\"validation\":\"\",\"required\":\"1\",\"min\":\"\",\"max\":\"\",\"tooltip\":\"field0\",\"custom\":null,\"custom2\":null},\"4\":{\"label\":\"What+is+the+primary+reason+for+the+rating+you+gave%3F\",\"value\":\"Because Anna is absolutely incredible. \",\"type\":\"para\",\"validation\":\"\",\"required\":\"0\",\"min\":\"0\",\"max\":\"60\",\"tooltip\":\"field1\",\"custom\":null,\"custom2\":null},\"5\":{\"label\":\"divider\",\"value\":\"\",\"type\":\"divider\",\"validation\":\"divider\",\"required\":null,\"min\":null,\"max\":null,\"tooltip\":null,\"custom\":null,\"custom2\":null},\"6\":{\"label\":\"Gender\",\"value\":\"Female\",\"type\":\"dropdown\",\"validation\":\"\",\"required\":\"1\",\"min\":\"\",\"max\":\"\",\"tooltip\":\"field3\",\"custom\":null,\"custom2\":null},\"7\":{\"label\":\"Age\",\"value\":\"30-45\",\"type\":\"dropdown\",\"validation\":\"\",\"required\":\"1\",\"min\":\"\",\"max\":\"\",\"tooltip\":\"field4\",\"custom\":null,\"custom2\":null},\"8\":{\"label\":\"Marital+Status\",\"value\":\"Married with children\",\"type\":\"dropdown\",\"validation\":\"\",\"required\":\"1\",\"min\":\"\",\"max\":\"\",\"tooltip\":\"field5\",\"custom\":null,\"custom2\":null},\"9\":{\"label\":\"Household+income\",\"value\":\"Prefer not to answer\",\"type\":\"dropdown\",\"validation\":\"\",\"required\":\"1\",\"min\":\"\",\"max\":\"\",\"tooltip\":\"field6\",\"custom\":null,\"custom2\":null},\"10\":{\"label\":\"City+you+reside+in\",\"value\":\"Oshkosh\",\"type\":\"dropdown\",\"validation\":\"\",\"required\":\"0\",\"min\":\"\",\"max\":\"\",\"tooltip\":\"field7\",\"custom\":null,\"custom2\":null},\"11\":{\"label\":\"If+other%2C+please+specify\",\"value\":\"Neenah\",\"type\":\"text\",\"validation\":\"\",\"required\":\"0\",\"min\":\"0\",\"max\":\"60\",\"tooltip\":\"field8\",\"custom\":null,\"custom2\":null},\"12\":{\"label\":\"divider\",\"value\":\"If you would like CitizensFirst to contact you regarding your responses, please complete the following:\",\"type\":\"divider\",\"validation\":\"divider\",\"required\":null,\"min\":null,\"max\":null,\"tooltip\":null,\"custom\":null,\"custom2\":null},\"13\":{\"label\":\"Name\",\"value\":\"Betsy Doran\",\"type\":\"text\",\"validation\":\"\",\"required\":\"0\",\"min\":\"0\",\"max\":\"60\",\"tooltip\":\"field10\",\"custom\":null,\"custom2\":null},\"14\":{\"label\":\"Email\",\"value\":\"aallen@citizensfirst.com\",\"type\":\"email\",\"validation\":\"email\",\"required\":\"0\",\"min\":\"\",\"max\":\"\",\"tooltip\":\"field11\",\"custom\":\"\",\"custom2\":\"\"},\"15\":{\"label\":\"Phone\",\"value\":\"920-236-7040\",\"type\":\"text\",\"validation\":\"\",\"required\":\"0\",\"min\":\"0\",\"max\":\"60\",\"tooltip\":\"field12\",\"custom\":null,\"custom2\":null},\"16\":{\"label\":\"Best+time+to+call\",\"value\":\"8am - 5pm \",\"type\":\"text\",\"validation\":\"\",\"required\":\"0\",\"min\":\"0\",\"max\":\"60\",\"tooltip\":\"field13\",\"custom\":null,\"custom2\":null},\"17\":{\"label\":\"title\",\"value\":\"Rate your most recent call to our Call Center\",\"type\":null,\"validation\":null,\"required\":null,\"min\":null,\"max\":null,\"tooltip\":null,\"custom\":null,\"custom2\":null}}","added":"23 Aug 2013 (09:45)","form_id":"1","form_name":"Call Center","seen":"1"}
  5. I am really a novice PHP user and exhausted my knowledge at this point. I need some help with exporting to .xls. I had found some form builder code. It exports the data now but instead of horizontally displaying the field responses, it creates a new line each time. See my attachment. Would anybody be able to assit me in having the export properly display in a new cell in the same row instead of a new row? Here is the code: <?php if ($handle = opendir('../submissions/')) { if (!isset($_SESSION)) { session_start(); } if (!(isset($_SESSION['user_email']))) { header( 'Location: login.php'); } $i = 1; // Loop through the submissions while (false !== ($entry = readdir($handle))) { if ((substr($entry, 0, 4)=='subm')) { $temp = json_decode(file_get_contents('../submissions/'.$entry), 1); $i++; $set_it[$i]=0; //if ( $temp['seen']=='1' ) { $seen = 'Read'; } else { $seen = 'Unread'; } $new = json_decode($temp['content'],1); // Loop through the input fields within a submission foreach ($new as $skey=>$value) { $skey++; if ( !(empty($value['type'])) && !($value['type']=='captcha')) { $mess[$skey] = "$value[value]"; if (!($set_it[$i])) { $set_it[$i]=1; $line[$i*$skey] = "$temp[added]\t$temp[form_id]\t$mess[$skey]"; } else { $line[$i*$skey] = "\t\t$mess[$skey]"; } } } // End of foreach (field loop) $i++; } } // End of While (submission loop) closedir($handle); } $header = 'Form Submission Data'; $sz = sizeof($line); $a=0; $data=''; foreach($line as $key=>$row) { $data.="$row\n"; } $data = "Date\tForm Id\tFirst Name\tLast Name\tEmail\tPhone Number\tBest time to contact\tCity\tRating\tReason for rating\n$data"; header("Content-type: application/x-msdownload"); header("Content-Disposition: attachment; filename=form_data.xls"); header("Pragma: no-cache"); header("Expires: 0"); print "$data"; ?>
  6. Hi- I am trying to add a link to a div tag that gets displayed from an echo statement: echo ' <div class="post-BIG" onclick="location.href='.$link.'"> '; I need to include the ' as a string but its already used for the concatenation. This might be a 101 question but I cannot figure it out.
  7. I am trying to modify some code so that the days dropdown has the correct amount of days for each month( Jan - 31 days, Feb 28, etc). I managed to get it so the correct days appear however it lists all the days. http://www.glitzphotography.com/date/dateform.php Can someone help me get this to work properly? Thanks! <?php function make_calendar_pulldowns($m = NULL, $d = NULL, $y = NULL) // This function makes three pull-down lists // for the months, days, and years. { // Make the months array. $months = array (1 => 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); // Make the months pull-down list echo '<select name="month">'; foreach ($months as $key => $value) { echo "<option value=\"$key\""; if ($key == $m) { echo ' selected="selected"'; } echo ">$value</option>\n"; } echo '</select>'; // Make the days pull-down list echo '<select name="day">'; foreach ($months as $key => $value) { $num = cal_days_in_month(CAL_GREGORIAN, $key, 2007); for ($day = 1; $day <= $num; $day++) { echo "<option value=\"$day\""; if ($day == $d) { echo ' selected="selected"'; } echo ">$day</option>\n"; } } echo '</select>'; // Make the years pull-down list echo '<select name="year">'; for ($year = 2005; $year <= 2015; $year++) { echo "<option value=\"$year\""; if ($year == $y) { echo ' selected="selected"'; } echo ">$year</option>\n"; } echo '</select>'; } // End of the function definition. // Create the form tags. echo '<h1 id="mainhead">Select a Date:</h1> <p><br /></p><form action="dateform.php" method="post">'; // Call the function. $dates = getdate(); make_calendar_pulldowns($dates['mon'], $dates['mday'], $dates['year']); // End of form. echo '</form><p><br /></p>'; // Print the current date and time echo '<p>Today is ' . date('l') . '. The current time is ' . date('g:i a') . '.</p>'; $num = cal_days_in_month(CAL_GREGORIAN, 11, 2007); // 31 echo "There was $num days"; ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.