Formbuilder 0.7.2 - Finding Values for Check Box Group

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
DougBailey
New Member
New Member
Posts: 4
Joined: Wed Jun 07, 2017 3:38 pm

Formbuilder 0.7.2 - Finding Values for Check Box Group

Post 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!
DougBailey
New Member
New Member
Posts: 4
Joined: Wed Jun 07, 2017 3:38 pm

Re: Formbuilder 0.7.2 - Finding Values for Check Box Group

Post 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.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3484
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Formbuilder 0.7.2 - Finding Values for Check Box Group

Post 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>
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Formbuilder 0.7.2 - Finding Values for Check Box Group

Post 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!!
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
DougBailey
New Member
New Member
Posts: 4
Joined: Wed Jun 07, 2017 3:38 pm

Re: Formbuilder 0.7.2 - Finding Values for Check Box Group

Post 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...
Post Reply

Return to “Modules/Add-Ons”