Page 1 of 1

Formbuilder 0.7.2 - Finding Values for Check Box Group

Posted: Wed Jun 07, 2017 3:59 pm
by DougBailey
I am trying to link a pdf file (so the visitor can view) to the list of check box group but cannot seem to get the value passed correctly. Here is the section that I need help with ASAP:

On the Form Template, the code below needs to find the VALUE of each option / array from a long list in the Check Box Group. I have tried soooo many options... :(

<tr>
{section name=numloop loop=$entry->input}
<td>{$entry->input[numloop]->input}&nbsp;<a href='uploads/OrderForm-Files/{$materials->input->name}.pdf'
target='new'>{$entry->input[numloop]->name}</a>{if $entry->input[numloop]->op}&nbsp;{$entry->input[numloop]->op}{/if}</td>
{if not ($smarty.section.numloop.rownum mod $cols)}
{if not $smarty.section.numloop.last}
</tr>

PLEASE let me know what I am doing wrong ASAP.

Thank you!

Re: Formbuilder 0.7.2 - Finding Values for Check Box Group

Posted: Wed Jun 07, 2017 6:24 pm
by DougBailey
It says "you can iterate through field->input->name and field->input->inputs", but I do not know how to do this... I have tried each one separately but neither work.

Help me please.

Re: Formbuilder 0.7.2 - Finding Values for Check Box Group

Posted: Thu Jun 08, 2017 9:01 am
by velden
Seems you're working with an old version of the module (and probably old version of CMSMS too). Consider upgrading.

It's not clear to me where this $materials variable is coming from and how you think it should have those input->name properties.

You might want to add some 'debug' statements to see what's available inside your loop.

E.g.

Code: Select all

<pre>{$entry->input[numloop]|print_r}</pre>

Re: Formbuilder 0.7.2 - Finding Values for Check Box Group

Posted: Thu Jun 08, 2017 10:40 am
by Rolf
velden wrote:Seems you're working with an old version of the module (and probably old version of CMSMS too). Consider upgrading.
You *should* upgrade! There are a few important vulnerabilities fixed in later releases!!

Re: Formbuilder 0.7.2 - Finding Values for Check Box Group

Posted: Thu Jun 08, 2017 12:53 pm
by DougBailey
$Materials is just the name of the Check Box Group. I want to find the value of each option but I do not know what it means to "iterate through field->input->name and field->input->inputs." I simply put in the name of my field (Materials) where field is...

I will consider upgrading. Is it going to be safe? It seems when we have upgraded in the past with other products, it changes everything and even lose things...