TOPIC:

How can I display an image in textfield or text box? 5 months 2 weeks ago #256842

  • Topic Author
  • Niederhofer
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 100
  • Thanks: 0
Hello there,
this is maybe a very simple question:
How do I show an image in content of textfield or textbox and let the rest of the field/box disappear - so there is only the image shown with no possibility to write something?

I tried in content of text field as a start:
<?php echo "<img src='C:/xampp/htdocs/joomla/media/breezingforms/uploads/47bb198478/foto1.jpg'>" ; ?>

But no picture appeared.

Any advice for newbie?
Thanks and kind regards! Andreas

Please Log in or Create an account to join the conversation.

How can I display an image in textfield or text box? 5 months 2 weeks ago #256851

  • Eddy.vh's Avatar
  • Eddy.vh
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 664
  • Karma: 4
  • Thanks: 112
Hallo Andreas,

Gibt es einen bestimmten Grund, warum das Bild in einem Textbox oder Textfeld erscheinen soll?

BreezingForms bietet die Möglichkeit, einen "Section" wohin du willst zu platzieren. Diese "Sections" ermöglichen es dir, das hinzuzufügen was du willst (Texte, Bilder, usw.), sobald du, in die Einstellungen diese Section, den Link "Editieren" klickst.

Das könnte deine Lösung sein!

crosstec.org/de/support/online-dokumenta...einzuf%C3%BCgen.html

LG.
Eddy



Hello Andreas,

Is there a specific reason for the image to appear in a Textinput or Textbox?

BreezingForms gives the possibility to place a "Section". These "sections" allow you to add what you want (Texts, images, etc.) after clicking the "Edit" link.

This could be your solution!

crosstec.org/en/support/online-documenta...dd-text-to-form.html

Regards,
Eddy

Please Log in or Create an account to join the conversation.

Last edit: Post by Eddy.vh.

How can I display an image in textfield or text box? 5 months 2 weeks ago #256852

  • Topic Author
  • Niederhofer
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 100
  • Thanks: 0
Dear Eddy, thank you for the reply!
As I am playing around for some time with amzing Breezing forms and crawl the nerves of poor Tihana with all my questions...I know, that I can put text into sections area. :)

But!: I am looking for a way to place images dynamically (user-specific) somewhere (textfield, section, text box,...doesnt matter) to show and inform the user, which images have already been uploaded in a session before.

So, I have a form, where you can upload max 3 JPG´s. These ones go into a user specific upload folder ('.../uploads/user1/foto1.jpg) and get always renamed in foto1, foto2, foto3.
The user has the possibility to reload the form for updating some information. I can reload user-specificly, which written information has been placed by this user before. But how can I reload the images also user-specific? How can I inform him, which images have been already uploaded before?

After reloading I have only the blank upload buttons. and no info whatsoever, which files were uploaded before.

Thats, what I would like to achieve and for me it doesnt matter, whether these images appear in section , text field, etc.
Thanks a lot for help and kind regards
Andreas
Attachments:

Please Log in or Create an account to join the conversation.

How can I display an image in textfield or text box? 5 months 2 weeks ago #256854

  • Eddy.vh's Avatar
  • Eddy.vh
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 664
  • Karma: 4
  • Thanks: 112
Andreas,

Maybe I have an idea for displaying the image in a section. I need to do some tests as soon as I find a little time.

Please Log in or Create an account to join the conversation.

Last edit: Post by Eddy.vh.

How can I display an image in textfield or text box? 5 months 2 weeks ago #256859

  • Eddy.vh's Avatar
  • Eddy.vh
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 664
  • Karma: 4
  • Thanks: 112
Hi Andreas,

I have prepared a small example for you.

A first section with :
  1. A name field that retrieves the username if the visitor is logged in.
  2. An image upload field for 'foto1.jpg'.
  3. A hidden field with value foto1 for generating the name of photo 1.

Look carefully at all the parameters of the 3 fields, they are important

A second section in which I have placed a div with an ID :
<div id="userfoto">&nbsp;</div>

In the initialization script part of the advanced properties a javascript that will generate the image display if the user is connected :
function ff_userfoto_init()
{

var uf = ff_getElementByName('username').value;

if ( uf != '') {
    document.getElementById('userfoto').innerHTML = '<img alt="User Foto" src="uploads/' + uf + '/foto1.jpg" />';
}
else {
    document.getElementById('userfoto').innerHTML = 'You are not connected. Login to see your photo';
}
}

The uploaded photo must always be in jpg format, you can force this in the upload field properties.

I have made a small video of the result so you can see the understanding.



I think this is ± what you are looking for.

Regards,
Eddy
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: Post by Eddy.vh.

How can I display an image in textfield or text box? 5 months 1 week ago #257057

  • Topic Author
  • Niederhofer
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 100
  • Thanks: 0
Thanx a lot, Eddy for this example and also for the chance to improve ma francais! I will have a look at it and tell you the outcome.

This is very much appreciated!
Kind regards
Andreas

Please Log in or Create an account to join the conversation.

Moderators: ForumSupport
Time to create page: 0.098 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

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!