Forum for discussing general topics related to Couch.
12 posts Page 1 of 2
Hi,

I am pretty sure that CouchCMS is one of most flexible systems that me as designer used for content manipulation. What I have done in my new project and where I stuck will be piece of cake for someone who understands coding a bit better. So, I am using couch for project with basic catalogue constructed from Portfolio and Gallery tutorials.

What I have done for now:
- clonable='1' dynamic_folders='1' gallery='1'
- works excelent
Each folder have his own TITLE, DESCRIPTION AND IMAGE

On my index.php page I am showing all folders/categories with image and title (with url to folder items).

On my products page I am showing folder title, folder description and all folder items (images with lightbox link), as well as category menu (all other folder links k_folder_link/k_folder_title).

It is amassing how everything works so smooth and with any errors. This is very easy to setup following well described tutorial on couch site.

But, yes there is one problem for me and further wish. I want on folder/category page where all my product/images are listed show contact form with custom fields which can be easily changed in admin area. Exactly i need custom fields in folder list because I have different products categories related to different order elements.

Is there any solution for this using external php contact form or I must build one and connect with couch folders structure?

Thanks in advance,
Proteus
Hello and welcome, Proteus :)
I am glad you found Couch useful.

Perhaps you'll find the following thread discussing dynamically creating forms useful -
"Dynamically generate a form" (viewtopic.php?f=8&t=7998)

Please let us know if you need any help with the process.

Thanks.
KK wrote: Hello and welcome, Proteus :)
I am glad you found Couch useful.

Perhaps you'll find the following thread discussing dynamically creating forms useful -
"Dynamically generate a form" (viewtopic.php?f=8&t=7998)

Please let us know if you need any help with the process.

Thanks.



Hm, well..based on my knowledge and logic this will create dynamic form in my product page but maybe I did not describe my wish.

I`ve created form.php file; in admin part where I control all the fields and other data such as labels any type of field, mandatory state and etc.

Field names are Name, Email, Phone, Address, Check boxes for product variations, Drop downs for product types, radios for quantities

...and what I really want now is to show different fields in products.php - catalogue folders/categories (not product page) from form.php.

Exactly this: on some random folder i need options to choose which fields I want to show or exclude from form.php.

I have finished creating form.php. In admin part I`ve created all necessary fields. That works well on my local machine. Mail function works well, I get nice styled HTML email confirmation on my email but I can`t include dynamic form on my categories where Category1 has form with less field than Category2...

Iam still confused about this.
Can you please post some mockups (or screenshots) of your design showing the different pages using the different forms? Will help me in understanding the situation.

Also, how exactly are you using form.php within the other pages?

Please let me know.
Thanks.
Sure,

i hope that images will explain my concept where form fields are already created in template form.php. Some fields user will populate (such as name, email, address...). I would like to include some of fields from template form.php to another template called products.php which lists categories (in my case folders). In each folder I need to have already defined fields from form.php but different type of forms.

Attachments

To simplify in 5 steps

1. Form with fields or dynamic form (where admin will populate options for product color, size, type of product...) Already defined fields; admin will populate options for drop down, radio buttons in Couch admin, visitor will populate fields such as name, email, phone and choose option from predefined fields on frontend:
- Name,
- Email,
- Phone,
- Product color (radio buttons)
- Product size (dropdown)
- Subject,
- Message,
- antispam
- Submit button.
- k_success,
- k_error,

2. form is used in clonable dynamic_folders (template clonable='1' dynamic_folders='1' gallery='1' )
3. random use of fields in different folders
4. message subject based on k_folder_title
5. submit collected data on admin email; maybe with copy on sender email
Thanks.

From what I could gather, if the 'folders' of products.php were somehow to have an editable region of type 'repeatable' (the one that you are currently using in form.php), you could go into the edit screen of each folder and configure the form elements through the repeatable region. Right?

Well, this seems to be precisely the use-case why 'extended-entities' feature was introduced.
Please see viewtopic.php?f=5&t=8581
The 'Extended Folders' section (http://www.couchcms.com/docs/extended-e ... /post2.htm) describes how you can add custom editable regions to the folders. I think you can associate your form.php to products.php and that would do it.

If you think that'd help, please upgrade to the new version of Couch and try it out.

Do let us know if you require any assistance.

Thanks.
Unfortunately following all these steps I cant get i to work.

In portfolio-folders.php I have all fields that I need but in portfolio.php there are only basic fields. I made new installation of Couch (couchcms-1.4.5RC1 BUILD 20140929) and it is online if you want to assist.
This is my code.

portfolio.php
Code: Select all
<?php require_once( 'couch/cms.php' ); ?>
<cms:template title='Portfolio' clonable='1' dynamic_folders='1' folder_masterpage='portfolio-folders.php'>
</cms:template>

<?php include('header.php'); ?>

<body>

<?php COUCH::invoke(); ?>


portfolio-folders.php
Code: Select all
<?php require_once( 'couch/cms.php' ); ?>
<cms:template title='Portfolio Folders' clonable='1' hidden='1'>
<cms:repeatable name='my_gallery' label='Gallery' >
        <cms:editable name='my_image' type='image' show_preview='1' preview_width='150' />
    </cms:repeatable>   
    <cms:repeatable name='form' label='Form' order='5'>
        <cms:editable name='title' label='Name' type='text'/>
        <cms:editable name='type' type='dropdown' label='Field Type' opt_values='Text=text | Text Area=textarea | Radio Buttons=radio | Checkbox=checkbox | Dropdown=dropdown |Date=datetime | E-mail=email'/>
        <cms:editable name='options' label='Options' type='text' />
        <cms:editable name='required' label='Mandatory?' type='radio' opt_values='Yes=1| No=0' />
        <cms:editable name='text' label='Error message' type='text' />
    </cms:repeatable>
</cms:template>

<?php COUCH::invoke(); ?>


Both templates are registered and editable regions show up only in portfolio-folders.
The 'extended-folders' module is enabled.
proteus wrote: Unfortunately following all these steps I cant get i to work.

In portfolio-folders.php I have all fields that I need but in portfolio.php there are only basic fields. I made new installation of Couch (couchcms-1.4.5RC1 BUILD 20140929) and it is online if you want to assist.
This is my code.

portfolio.php
Code: Select all
<?php require_once( 'couch/cms.php' ); ?>
<cms:template title='Portfolio' clonable='1' dynamic_folders='1' folder_masterpage='portfolio-folders.php'>
</cms:template>

<?php include('header.php'); ?>

<body>

<?php COUCH::invoke(); ?>


portfolio-folders.php
Code: Select all
<?php require_once( 'couch/cms.php' ); ?>
<cms:template title='Portfolio Folders' clonable='1' hidden='1'>
<cms:repeatable name='my_gallery' label='Gallery' >
        <cms:editable name='my_image' type='image' show_preview='1' preview_width='150' />
    </cms:repeatable>   
    <cms:repeatable name='form' label='Form' order='5'>
        <cms:editable name='title' label='Name' type='text'/>
        <cms:editable name='type' type='dropdown' label='Field Type' opt_values='Text=text | Text Area=textarea | Radio Buttons=radio | Checkbox=checkbox | Dropdown=dropdown |Date=datetime | E-mail=email'/>
        <cms:editable name='options' label='Options' type='text' />
        <cms:editable name='required' label='Mandatory?' type='radio' opt_values='Yes=1| No=0' />
        <cms:editable name='text' label='Error message' type='text' />
    </cms:repeatable>
</cms:template>

<?php COUCH::invoke(); ?>


Both templates are registered and editable regions show up only in portfolio-folders.
The 'extended-folders' module is enabled.


Hi, can you explain exactly what isn't working? Are you not seeing the repeatable regions from portfolio-folders within the 'Edit' screen of the dynamic folders?
Image
Exactly! Repeatable regions from portfolio-folders are not shown/available within the 'Edit' screen of the dynamic folders (portfolio.php)?
12 posts Page 1 of 2