Eric Rohloff wrote:
Hi David,
In the Form Builder select Setting, then select the Confirm Page tab.
Now you can edit the Confirmation message and use the individual input names [firstname], [lastname], etc. instead of the [_form_results_].
You should be able to use the same or similar code for the emails.
Thank you Eric Rohloff! I appreciate you answering me and offering your help!
I am sorry it took so long to reply back here. I've been tracing things down and trying to see what was going on before I replied back. I've gotten to know the CoffeeCup Web Form Builder better but, I still have a lot to learn.
I had seen your answer that was similar to someone asking for help to remove the IP from showing here.
https://www.coffeecup.com/forums/web-form-builder/remove-ip-address-on-form-submit-confirmation/?post_id=299501 I am not sure that is going to fix my problem. The results that it's giving me is what I want to keep but, I would like the teams that I picked in vertical order.
I changed the [form_results] to [checkbox3] just to see if anything would change. In the Coffecup Web Form Builder in the settings>confirm page...at the bottom where it says insert data from...I see we can put our cursor where we want it and select a label from the dropdown and it will put the group name with the brackets wherever our cursor is at. I've attached a photo showing where the insert data is for people that don't know.
From what I discovered is that the codes are writing the text (teams) with commas behind them in a single table cell from left to right. To me, I think they should be in separate table cells.
This was the result that I got from the way you see it set up in the attached photo:
Arizona Cardinals, Atlanta Falcons, Baltimore Ravens, Oakland Raiders, San Diego Chargers, St. Louis Rams, Washington Redskins2023-09-19 16:08:06
Thank you!
Your form was successfully submitted. We received the information shown above.
Four of those teams have changed their names...just saying it because the option list is outdated.
This is part of the source code that I got from view source code in my e-mail.
Sent In The E-mail. You can see that it created one full table cell with commas separating the teams that I selected.
<td>Detroit Lions, Green Bay Packers, Houston Texans, New Orleans Saints, New York Giants, New York Jets, St. Louis Rams</td>
If you look at that above you can see it's one line written with no table cells separating them. I want it to be more like this without the commas and in separate table cells like I have in the code below.
That was for the e-mail. It comes out similar in the confim page.
I think the code should be more like this without the commas.
<td>Detroit Lions</td>
<td>Green Bay Packers</td>
<td>Houston Texans</td>
<td>New Orleans Saints</td>
<td>New York Giants</td>
<td>New York Jets</td>
<td>St. Louis Rams</td>
I don't think anymore that changing the display from:
display:inline-block;
to:
display:block;
...is going to help any with the way the selections are written in one line of text with commas like that. A following code would have to be added to that to covert all of those selections into table form and removing the commas.
I wonder what file it is that writes up the initial form results or what file it is where the form_result info get's retrieved from.
The initial form code starts here (my filename is nflpicks):
<style>#docContainer .fb_cond_applied{ display:none; }</style><noscript><style>#docContainer .fb_cond_applied{ display:inline-block; }</style></noscript><form class="fb-toplabel fb-100-item-column selected-object" id="docContainer"
action="../nflpicks.php" enctype="multipart/form-data" method="POST" novalidate="novalidate"
data-form="manual_iframe">
My nflpicks.php file connects to the /fbapp/php/config.inc.php file which connects to the form.cfg.php file and other places.
It looks like the tables for the forms might be created here in this form:
messagepostmerger.cls
private function _FindLabelByFieldName ( $name ) {
$label = Config::GetInstance()->GetConfig( 'rules', $name, 'label' );
return $label ? $label : $name;
}
private function _FormatFormContents ( $useHtmlEntities = true ) {
$form_contents = '<table style="width: 100%;"><tbody style="vertical-align: text-top;line-height: 30px;">';
// use the rules to list output in the right order
foreach( Config::GetInstance()->GetFieldNames() as $name )
{
// first check if the post value exist
if( isset( $this->post[ $name ] ) && !empty( $this->post[ $name ] ) ) {
$form_contents .= 'messagepostmerger.cls<td style="font-weight: bold; width:30%;">' . $this->_FindLabelByFieldName( $name )
. ':</td><td>'. $this->_FormatFieldValue( $name, $this->post[ $name ], $useHtmlEntities ) . '</td></tr>';
}
// check the file uploads only if the post[] doesn't exist,
// this avoids listing the same file twice which may happen when
// saving for sqlite and csv adds these fields to post, but
// for mysql with files stored in a table this doesn't happened
elseif( isset( $this->uploads[ $name ] ) ) {
$form_contents .= '<tr><td style="font-weight: bold; width:30%;">' . $this->_FindLabelByFieldName( $name )
. ':</td><td>'. $this->uploads[ $name ][ 'orgname' ] . '</td></tr>';
}
}
I am little tired from tracing stuff down. I hope I am not wasting anybody's time including my own. I did write up a ticket with coffeecup by accident. I thought I was asking for help in the forum when I wrote them. The service person asked me for my saved .fb file and I sent it to them. I heard back from them a couple of times asking me for my .fb file and they asked me some questions and I answered and I never heard back from them again. I don't know if they are still looking into it but, I don't think they are.
This is pretty important for me to get working with the checkbox selections working where it comes out in vertical form for my music request list. The DJ program that I use allows us to drag and drop a .txt file with
artist - title (remix) of a list that we create into a Virtual Folder or a playlist with info in it and it will find the songs for us and place the songs that it matches up to in that .txt file list.
I am going to take a break here. I am tired of looking at all of this but, I am impressed with all of the coding that I see in the form builder and especially that part of code in the utilities.inc that helps prevent injections from disguised files. A group that I was working with couldn't figure how to prevent that five years ago in a script that I was helping out with.
If someone can help figure out my issue, I would really appreciate it. I need the checkbox form to list the selections vertically. I assume we have to come up with a code that creates a tables cell for each checkbox selection and use a
str_replace to remove the commas.