Hello!
I am working on some sort of a CRM with Couch.
One of the section is the "Proposal" clonable pages. I need to be able to convert a Proposal to a "Contract", which is another clonable page section.
What I did is this:
Everything is working perfectly fine, except that "contact_dropdown" region, used in the "db_persist_form" section of the code.
That region is a relation region. It is linked with another page, showing the clients name.
You can see the "sous_total" region too here, which is a regular text field. It is correctly being copied in the converted proposal to a contract. But for some reasons, it seems like "Relation" regions are not being "cloned".
Any idea why?
Same seems to be happening with repeatable regions. It's not being copied to the new page.
Thanks a lot
I am working on some sort of a CRM with Couch.
One of the section is the "Proposal" clonable pages. I need to be able to convert a Proposal to a "Contract", which is another clonable page section.
What I did is this:
- Code: Select all
<cms:form
masterpage="contrats.php"
mode='create'
enctype='multipart/form-data'
method='post'
anchor='0'
>
<p>Convertir en contrat ?</p>
<cms:input name='submit' type="submit" class="button red" value="Oui, convertir en contrat" />
<cms:if k_success>
<cms:db_persist_form
k_page_title=k_page_title
sous_total=sous_total
contact_dropdown=contact_dropdown
/>
<cms:admin_add_js>
$(function() {
toastr.success("Proposition convertie en contrat avec succès", "Succès!", { // TODO: localize
"positionClass": "toast-top-right",
"showDuration": "250",
"hideDuration": "250",
"timeOut": "3500",
"extendedTimeOut": "500",
"icon": '<cms:show_icon 'check' />'
});
});
</cms:admin_add_js>
<cms:db_delete masterpage=k_template_name page_id=k_page_id />
<cms:redirect "http://localhost:8888/edit/?o=propositions.php&q=list" />"
</cms:if>
</cms:form>
Everything is working perfectly fine, except that "contact_dropdown" region, used in the "db_persist_form" section of the code.
That region is a relation region. It is linked with another page, showing the clients name.
You can see the "sous_total" region too here, which is a regular text field. It is correctly being copied in the converted proposal to a contract. But for some reasons, it seems like "Relation" regions are not being "cloned".
Any idea why?
Same seems to be happening with repeatable regions. It's not being copied to the new page.
Thanks a lot