Problems, need help? Have a tip or advice? Post it here.
6 posts Page 1 of 1
I copied the code of DBF from Databound Forms as is without any changes. (There are not js/css/external resource files. Its the exact same code from the URL above.)

Also my kfunction.php code is as follows:
Code: Select all
<?php
if ( !defined('K_COUCH_DIR') ) die(); // cannot be loaded directly

//require_once( K_COUCH_DIR.'addons/cart/cart.php' );
//require_once( K_COUCH_DIR.'addons/inline/inline.php' );
//require_once( K_COUCH_DIR.'addons/extended/extended-folders.php' );
//require_once( K_COUCH_DIR.'addons/extended/extended-comments.php' );
//require_once( K_COUCH_DIR.'addons/extended/extended-users.php' );
//require_once( K_COUCH_DIR.'addons/routes/routes.php' );
//require_once( K_COUCH_DIR.'addons/jcropthumb/jcropthumb.php' );
require_once( K_COUCH_DIR.'addons/data-bound-form/data-bound-form.php' );


I added the line
require_once( K_COUCH_DIR.'addons/data-bound-form/data-bound-form.php' );
as it was not there in the file.

Now when I submit the form I get the Success Message (as defined in the code)
Success: Your application has been submitted.


But the same does not submit to the backend.

Also, I am using CouchCMS V2.0.

Regards,
Aashish
Image
where innovation meets technology
Please modify the following portion of the code -
Code: Select all
<cms:if k_success >

    <cms:check_spam email=frm_email />

    <cms:db_persist_form
        _invalidate_cache='0'
        _auto_title='1'
    />

    <cms:set_flash name='submit_success' value='1' />
    <cms:redirect k_page_link />
</cms:if>

- to make it as follows:
Code: Select all
<cms:if k_success >

    <cms:check_spam email=frm_email />

    <cms:db_persist_form
        _invalidate_cache='0'
        _auto_title='1'
    />

    <cms:if k_success >
        <cms:set_flash name='submit_success' value='1' />
        <cms:redirect k_page_link />
    </cms:if>
</cms:if>

As you can see, we are adding an additional check to see if <cms:db_persist_form> successfully persisted the form.

I think you should now be able to see exactly what is causing the save to fail.

Hope it helps.
@KK Sir,

It has started to work.
Now I have two more queries relating to the same.
1.Once a form is submitted and the page refreshes, the submit button disappears. The page needs to be refreshed again to get the button back to display.
2. I have a regular couch template with editable regions for the content to be displayed on the page. I want to embed this DBF in to that template. How do i do that?

Regards,
Aashish
Image
where innovation meets technology
When I use the my_list.html file from the DBF Documentation i am facing the following problems:

1. The Table is not displayed
2. The <cms:admin_link> is not working

I have attached a snapshot for the same.
dbf_admin_panel_error.png
dbf_admin_panel_error.png (47.72 KiB) Viewed 1583 times


Did I do something wrong?
Image
where innovation meets technology
Hi,

Actually we can get away without using the 'custom screen' in Couch v2.0.

Please turn off that custom screen by commenting out the "$FUNCS->register_admin_listview()" line in kfunctions.php.
Then try using the <cms:config_list_view> provided by v2.0 to create a similar screen much more easily.

Please see the 'Customizing the List screen' section in viewtopic.php?f=5&t=10241

Hope it helps.
SOLUTION: Thanks @trendoman

The button disappearing problem can be corrected by removing these two lines:
1. <cms:if "<cms:not submit_success />" > (opening If)
2. </cms:if> (Closing if)

Do not remove the code inside the <cms:if>.

@KK Sir,
It didn't strike me that in V2.0 the admin panel can be edited easily. Thanks for reminding. The solution you suggested Worked! Thanks!

Regards,
GenXCoders
Image
where innovation meets technology
6 posts Page 1 of 1
cron