332 Posts
Kenneth
9 years ago
Topic

Hi,

I'm not sure in which end to start with this. 

I've got a form that picks up variables from a url, and let's the user fill just one textarea before submitting. Perfect. 

I do this to take feedback on content st the bottom of some pages. The way I do so is to create a link with some variables for the content (article id, article title, content type...).

The submitted item then shows up for frontend administrators. They can open it in form view. Here they can see the article title where the feedback link got pushed. Nice. But....

The missing link: I need to create a link in this form view that links to the content that got the feedback.

I'm thinking all that is needed is a field that could query the database after the article id, and link to it. But I can't find a field that does this. Is my only way of fixing this to create a custom template, or can it be solved with a field setting?

Get a Book for SEBLOD
572 Posts
_jrmo
9 years ago
5
Level 1

Hi Kenneth,

"The submitted item then shows up for frontend administrators. They can open it in form view."

Why? Why not use Joomla Access Levels and let the frontend admin open it up in a Content View? Or list all the enquiry information for each submission in a list view? then creating your link would be simple :)

Your submission form could have a hidden art_access field on it with a pre-set value only allowing a certain access level to view the content.

_jrmo

332 Posts
Kenneth
9 years ago
4
Level 2

Nice twist. That would solve it if it was only for this content type. :)

Thing is; I've made a feedback app that does two things; it handles empty searches and feedback on articles.

On articles I've made a link at the bottom that takes the user to the feedback form, and via the url grabs some paramters.

On empty searches I redirect to the same feedback form with the same and some other variables in the url.

So for the administrators of the site, they will see the list with both feedback on articles and from empty searches.

When there is feedback on the article, I want to link to it from the item view. I'm not sure, but I don't belive your suggstion will help in my case?

572 Posts
_jrmo
9 years ago
3
Level 3

Yes, it's still possible with what you have described. But you'll need to use a Position Override on your item view to achieve it. I assume if the feedback is on an empty search, you DON'T want to display the link in the item view?

  1. In your site form, if you don't already have it, have a hidden radio field with the options Article=1 EmptySearch=2 - use a URL variable to select which type of form is being submitted. 
  2. In your item view, create a position override, and add a PHP if statement to determine if your link should be displayed in the item view. Something like:
    <?php if ($cck->getValue('radio_field')==1) { ?>
    <a href="/$cck->getLink('art_title')">Link goes here</a>
    <?php } ?>
  3. replace radio_field and art_title in the code above with the proper SEBLOD fields that apply.

Hope that helps!

_jrmo

332 Posts
Kenneth
9 years ago
2
Level 4

Thanks for the tip! I will give it a go!

And also; the tutorial! This is quite new, isn't it? I haven't seen it before. :)

572 Posts
_jrmo
9 years ago
1
Level 5

Yes, brand new ;)

Over 50 manuals now available on learning SEBLOD in that resources section. It's very nice :D

332 Posts
Kenneth
9 years ago
0
Level 6

Nice! :) Thanks. I love Seblod. :P

Get a VIP membership