Editbox conditions, hide

Issues related to forms.
Post Reply
Azz
 
 
Posts: 8
Joined: Sat Jan 04, 2025 1:17 am

Editbox conditions, hide

Post by Azz »

Hello dear Pablo! I just found little problem using editbox conditions. I tried to hide editbox if value less than 1, but it doesn't work. After that, I tried disable the same editbox with the same conditions, and it works! But I need to hide it. I tried distinct “configurations”, but it still not working. Disable work in all configurations, but not hide. About disable... If I use combobox with for example 2 values, 1 and 2. With 2, disable editbox. When I return combobox back to value 1, the editbox steel disabled. Reload page solve this. I tried to apply conditions of editbox to itself, if value is less than 1, hide himself does not work, but disable works (echo from mysql). I don't understand how to fix it... Please help. I'm using latest version.
User avatar
wwonderfull
 
 
Posts: 1585
Joined: Fri Aug 21, 2020 8:27 am
Contact:

Re: Editbox conditions, hide

Post by wwonderfull »

Azz wrote: Thu Apr 03, 2025 1:25 am Hello dear Pablo! I just found little problem using editbox conditions. I tried to hide editbox if value less than 1, but it doesn't work. After that, I tried disable the same editbox with the same conditions, and it works! But I need to hide it. I tried distinct “configurations”, but it still not working. Disable work in all configurations, but not hide. About disable... If I use combobox with for example 2 values, 1 and 2. With 2, disable editbox. When I return combobox back to value 1, the editbox steel disabled. Reload page solve this. I tried to apply conditions of editbox to itself, if value is less than 1, hide himself does not work, but disable works (echo from mysql). I don't understand how to fix it... Please help. I'm using latest version.
I think this could not be a bug as it could be by function like this.

You see if you go to editbox and put condition IF LESS THEN 1 it should hide then that means your editbox must have a prefilled value greater than 1 so on general tab there is a field called Value there you must write something which is equal to 1 or greater than 1 which could be 2,3,4...... etc

So if the value is written or goes to 0 then it will hide. I have tested myself.
User avatar
Pablo
 
Posts: 23447
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Editbox conditions, hide

Post by Pablo »

If you need help with this, then please share a DEMO project, so I can see all your settings.

I do not need the complete project because that will only take more time to figure out what you have done.
Basically, I just need a small project with one page and object(s) that are relevant to your question.

For further details about how to share a project file, please see this FAQ:
viewtopic.php?f=10&t=82134
Azz
 
 
Posts: 8
Joined: Sat Jan 04, 2025 1:17 am

Re: Editbox conditions, hide

Post by Azz »

Here is 2 PHP pages of my project. https://disk.yandex.ru/d/65vIW-vidhfIbQ
When i delete all php part and save like html, hiding works. But if i save with all php and with extention.php only disabling works, but not hide. I steel having a hope that hide can work
User avatar
Pablo
 
Posts: 23447
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Editbox conditions, hide

Post by Pablo »

I'm sorry but I am confused by your example.

Are you trying to hide the object itself when you input a value? That does not make any sense to me :?
How is it suppose to work?

Also, can you please remove everything from the project that is not prevalent to your question. So, it is immediately clear what you are trying to do.
Azz
 
 
Posts: 8
Joined: Sat Jan 04, 2025 1:17 am

Re: Editbox conditions, hide

Post by Azz »

Yes, in EDITPOST page, when editbox displays echo information from database, if is less than 1, editbox disable itself, and it works. Editboxes is really disabled, and if value is 1 or more, editbox enabled. When I change “disable” to “hide”, hide don't work in same condition and same all. About ADDPOST page, combobox controls visibility or disabling of editboxes, if less than 6, disabling editboxex works, hiding not work. If I remove my php code, and save it in html, hiding work.... Sorry if I explaining bad... Selfdisabling works.
User avatar
Pablo
 
Posts: 23447
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Editbox conditions, hide

Post by Pablo »

What do you mean by 'If I remove my php code'?
Which code are you removing?
Azz
 
 
Posts: 8
Joined: Sat Jan 04, 2025 1:17 am

Re: Editbox conditions, hide

Post by Azz »

In Page HTML , Start of page, my php code to connect database, and load information to it.

(<?php
ob_start();
session_start();
if (!isset($_SESSION['username'])) {
header('Location: ./noaccess.html');
exit;
}
require_once 'image_processor.php';
$mysql_server = 'localhost';
$mysql_database = 'fpfvfnpfc2';
$mysql_table = 'userpost';
$mysql_username = 'fpfvfnpfc2';
$mysql_password = .... etc.).

When I leave it empty (page html) , and save the *.html (not *.php), hiding works correctly, but without my code xD
User avatar
Pablo
 
Posts: 23447
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Editbox conditions, hide

Post by Pablo »

Then maybe there is an error in your code?

For example, you have added a link to jQuery, but this is already included.

If you need further assistance then please remove all custom code.
Azz
 
 
Posts: 8
Joined: Sat Jan 04, 2025 1:17 am

Re: Editbox conditions, hide

Post by Azz »

Thank you! I removed jQuery link and it works now. Editbox hidding. The same with self hidding editboxes. BUT, if I choose other combobox value, after hidding, boxes steel hidden, don't appear. If I add more conditions with SHOW, boxes don't appear after hidding. About selfhidding, it works to, but the label of editbox don't disappear. Maybe if possible in future versions, when editbox selfhide (echo from batabase), his label must hide to) Thank you for you help!
User avatar
Pablo
 
Posts: 23447
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Editbox conditions, hide

Post by Pablo »

If you need further assistance then please share an updated project

Make sure you remove all custom code and elements that are not relevant to your question.
Post Reply