Adding users form record in article

  • jimmiewiddle
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 32
  • Thank you received: 1

jimmiewiddle created the topic: Adding users form record in article

Hi, Im attempting to add a users record of a completed form into a article (and if doesn't exist/not completed to add a link for the user to fill in the form).

Im currently using the following code in my article:
{component url='index.php?option=com_contentbuilder&view=latest&layout=latest&id=2&limit=1' }

This almost works fine except that if the user has not completed the form previously, it redirect/forward the user to complete the form, which unfortunetly when using the method above (component in article (which works in an iframe)) loads the homepage of the site into the iframe rather than the form to complete.

I wondered if it possible to disable the redirect/forward and instead provide the user with a link to create a new record/complete the form?

Thanks so much in advance!
Mark
#232410
  • Posts: 2104
  • Karma: 65
  • Thank you received: 255

DarkoCujic replied the topic: Adding users form record in article

Hey,

sorry for the late answer.

It all depends on the way you're handling that redirect. Is it done with JavaScript or PHP? If it's in JS, you can do:
window.top.location.href = "http://www.example.com";

or if it's done with PHP, then you can do something like this:
<?php echo "<script>window.top.location.href = \"http://www.example.com\";</script>"; ?>

Other than that, I don't know of any other methods.

Regards,
Darko

Satisfied with our support? PayPal tips
===========
Need to renew Pro Support? Buy Here!
===========
Satisfied? Consider a membership!
===========
Like us on Facebook
===========
Support Crosstec and get ALL EXTENSIONS and professional support for just $5. Here!
#232504
The following user(s) said Thank You: jimmiewiddle
  • jimmiewiddle
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 32
  • Thank you received: 1

jimmiewiddle replied the topic: Adding users form record in article

Hi,

Thanks for your response, although I think unfortunetly I haven't explained the issue properly/you misunderstand.

Basically im trying to allow users to add a signature (breezingforms signature field) to their user profile. And for this signature to appear on a joomla article OR (if the user hasn't yet added a signature) a link for the user to add their signature.

To clarify, the redirect is already functionality of contentbuilder when using the View - latest.

When using this view if the user hasn't previously completed the form they are forwarded to a page to complete the form.

This message contains confidential information


Many thanks in advance!!!!
#232505
The following user(s) said Thank You: Tirthankar
  • Posts: 2104
  • Karma: 65
  • Thank you received: 255

DarkoCujic replied the topic: Repeat Section multiple Times

Hey,

I've been re-reading your reply for the last 3 hours and I'm still not sure I completely understand.

When I logged in with the frontend account and went to the URL you provided, I see the article with a page that looks like it's an iFrame, but it actually isn't. So, I presume that that's the issue.
ContentBuilder wasn't meant to be displayed like this. The reason you're seeing this page is probably due to the extension you're using is loading (fetching/getting/crawling) the page that it's supposed to and then parses it so it doesn't sit in an iFrame and displays it as normal HTML. The problem is that the request it's making is in a separate session and it can't pick up the login cookie.

I'm really not sure how to proceed with this. Please let me know if I understood it now.

Regards,
Darko

Satisfied with our support? PayPal tips
===========
Need to renew Pro Support? Buy Here!
===========
Satisfied? Consider a membership!
===========
Like us on Facebook
===========
Support Crosstec and get ALL EXTENSIONS and professional support for just $5. Here!
#232562
The following user(s) said Thank You: jimmiewiddle
  • jimmiewiddle
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 32
  • Thank you received: 1

jimmiewiddle replied the topic: Repeat Section multiple Times

Hi, Yes the page on the link I sent is a joomla article which uses the following code:
{component url='index.php?option=com_contentbuilder&view=latest&layout=latest&id=2&limit=1' }

Let me try again to explain this as simply as possible as it is quite a simple requirement:

I just need a users form record (1 field of type signature) to be displayed in a joomla article. IF no form record exists for the user (they haven't completed the form previously) they get a link to the form to complete.

Simple no?



Heres my original forum post (below) which goes into more detail about how I have tried to achieve this. (which seems to have been removed? I cant find it 'under my topics').

Hi, Im using breezingforms and contentbuilder to allow users to add and edit a signature (using breezingforms signature field) to store as part of there user profile.

Everything works fine, except when it comes to displaying the users signature to them, on a joomla article.

Am I correcting in thinking that their are little options available to do this? And nothing like this..
<?php echo $user->signature ?>

Currently I am experimenting with the code below which I found as the only option.
{component url='index.php?option=com_contentbuilder&view=latest&layout=latest&id=2&limit=1' }
This message contains confidential information


This almost works fine except that if the user has not completed the form previously, something attempts to redirect/forward the user to complete the form, which unfortunetly when using the method above (component in article (which works in an iframe)) it loads the homepage of the site into the iframe rather than the form to complete.
I wondered if it possible to disable the redirect/forward and instead provide the user with a link to create a new record/complete the form? This would be perfect is so.

Ive also experimented with using:
{component url='index.php?option=com_contentbuilder&view=list&layout=listone&id=2&limit=1' }
This message contains confidential information


Which also almost works perfectly, except for if the user has completed the form previously there just needs to be an 'edit' button on this page. Ive tried to create this button using the code from the [details] php template (below) but unfortunetly the record_id variable is 0/incorrect.
<a class="button btn btn-primary cbButton cbEditButton" href="<?php echo JRoute::_( 'signature/edit/'.JRequest::getInt('id', 0).'/'.JRequest::getCmd('record_id', 0).(JRequest::getVar('tmpl', '') != '' ? '&tmpl='.JRequest::getVar('tmpl', '') : '') ); ?>"><?php echo JText::_('COM_CONTENTBUILDER_EDIT')?></a>

Any help would be very much appreciated!!
Many thanks in advance!!
#232563
  • Posts: 2104
  • Karma: 65
  • Thank you received: 255

DarkoCujic replied the topic: Repeat Section multiple Times

Hey,

I'm not entirely sure it's possible, and I'm not acquainted with the extension you're using for displaying (and we don't support 3rd party apps), but a standard PHP query should be possible.

As I see, you're using a view connected to the BF form signature. You could query #__facileforms_records to see if there is anything there for user_id of the logged in user and if yes, display the value from #__facileforms_subrecords where record = id from previous query and name = signature. If there isn't a result from the first query, then output a link to the form where you add your signature.

For anything else, I'm pretty sure you'd have to override some core files. Not sure which as I'd have to research it.

Regards,
Darko

Satisfied with our support? PayPal tips
===========
Need to renew Pro Support? Buy Here!
===========
Satisfied? Consider a membership!
===========
Like us on Facebook
===========
Support Crosstec and get ALL EXTENSIONS and professional support for just $5. Here!
#232565
The following user(s) said Thank You: jimmiewiddle
Moderators: ForumSupporttomeperica
Time to create page: 0.071 seconds

New Support System

Dear Customers,

Users with active subscription have support priority which will be dona via ServiceDesk (My Account > Raise a ticket).
FREE Support topics will be answered when AND if there is time.

You can check support guidelines here : here

Regards,
Crosstec Team

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99€

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here