TOPIC:

How can I display an image in textfield or text box? 8 months 2 hours ago #257155

  • Topic Author
  • Niederhofer
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 100
  • Thanks: 0
Bonjour and Thank you Eddy for this nice example!
In fact, this is more, what I expected...

To adapt this to my needs, one questions please:
Where in the second section did you place "<div id="userfoto"> </div>"?

I could not find it... :(

Thank you!

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? 8 months 2 hours ago #257162

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 7843
  • Karma: 3
  • Thanks: 550
Hi,

please go to section with Title: User Foto, and name: user_foto.
In the Properties of this sections->Description->click on Edit and you will see:
<div id="userfoto"> </div>

Regards,
Tihana
The following user(s) said Thank You: Eddy.vh

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

How can I display an image in textfield or text box? 7 months 4 weeks ago #257180

  • Topic Author
  • Niederhofer
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 100
  • Thanks: 0
Hej Tihana,
I checked:


...but there is nothing:



I looked there before - therefore I asked the question.
Attachments:

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

How can I display an image in textfield or text box? 7 months 4 weeks ago #257183

  • Eddy.vh's Avatar
  • Eddy.vh
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 669
  • Karma: 4
  • Thanks: 113
Hello.

The div is not visible in Wysiwyg mode since it is initially empty.
You have to switch the editor to code mode.

LG.
Eddy

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

How can I display an image in textfield or text box? 7 months 4 weeks ago #257191

  • Topic Author
  • Niederhofer
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 100
  • Thanks: 0
Hey Eddy,
thanks! Everday something new to be learned - now I have seen it! For the ones, who didnt know this either: the editor code mode can be found in Description-> Edit -> Tools -> <> source code

I will play with that and adapt...lets see, how far I get!
Have a nice day, Eddy
KR Andreas

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

How can I display an image in textfield or text box? 7 months 4 weeks ago #257221

  • Topic Author
  • Niederhofer
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 100
  • Thanks: 0
Dear Eddy and Tihana,
I got stuck! I can follow the logic of Eddy´s coding, but I cant transfer it. I would only need the part, where the fotos are loaded and shown in section.
Form 1: The uploading into ".../uploads/ID/foto1.jpg." and the renaming into "foto1.jpg" works fine. ID is not from the system, but a string, which is created in this form individually for each user. So we have folder "uploads", subfolder "ID" and in there file "foto1.jpg".

Now the foto has to be loaded from ".../uploads/ID/foto1.jpg." and displayed in a section of form2. To this form2 "ID" is handed over from Form1.


I changed the code for Initscript to following :

function ff_form2_init()
{

var uf=JRequest::getVar('ID');
//var uf = ff_getElementByName('ID').value;

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

In Section-properties-edit-tools-
<p>This is optional! You can upload max 3 photos of the object to be delivered - these photos will be included in the contract.</p>
<div id="form2"> </div>

What do I get wrong?

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

Moderators: ForumSupport
Time to create page: 0.105 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!