Get some content of the current page

juansolos 04 Jan, 2017
Hi,
i am looking for make a form in a category views (or search page results) of a cck.
Each entry in this page have a email field.
I would like to put these mails in the "send to" field of chronoform.

Any idea to get this value?

Regards
GreyHead 04 Jan, 2017
Hi juansolos,

What is a cck?

There isn't enough information here to give a useful answer :-( How are the emails shown in the entries? Can you post a link to a sample page?

Bob
juansolos 04 Jan, 2017
Hi GreyHead ,
it is sobipro, i search to get all field email of the entries of the page (result page).

And send the form to this email.

I need to make a seach to filter entries so results appear after a seach on this page
https://demo.sobi.pro/restaurant-guide/search

I should hid results to display the form that get the email fields as send to.

I hope be clear

Regards
GreyHead 04 Jan, 2017
Hi juansolos,

SobiPro I know a little bit about - but I still have no idea what you are trying to do with ChronoForms :-(

Bob
juansolos 04 Jan, 2017
I have a directory in sobipro, i have a field email.

I make a seach on the sobipro search page and get some results.

I want to display a chronoform in this result page.

The form will be send to all field email.

So i am looking for to get the value of the field email in the result page.
GreyHead 04 Jan, 2017
Hi Juan,

You can probably use JavaScript to read the entries on the page and grab the restaurant names or ids and and add them to a hidden input in your form. Then you can look up the restaurant info to get the emails after the form submits.

For example jQuery('.restaraCard h2') gives you an array of jQuery objects for the H2 headers for the restaurants on the page.

Bob
juansolos 06 Jan, 2017
Hi,
thanks, i am following this way.

Regards
juansolos 09 Jan, 2017
Hi,
ok i am able to get information about the current page. $results
But i am not able to insert a cf form in the search page of sobipro. The submit button of the search form and the submit button of CF seems to be in conflict.

So i try to creat a link "contacts" to a cf form page.
How to get the variable $results from the previous page to insert it in the ck form?

Regards
GreyHead 09 Jan, 2017
Hi juansolos,

You can't nest one form inside another - that may be the problem on the SOBIPro page. You could perhaps add the form in a module - or in the page but outside the SOBIPro <form> tags.

Otherwise you could use the JavaScript to add the search results to the form URL, or possibly to a cookie???

Bob
juansolos 09 Jan, 2017
Hi,
yes indeed. form in form not fine.
Create a link to a cf form using cookies to get id of entries seems to be my only solution.
Thanks
Regards
This topic is locked and no more replies can be posted.