Please read and follow the COMMON ISSUES first!
Always add your version information in every new post! Thank you!

Form2Content Forum

Questions and answers for Form2Content, a Joomla CCK.
  1. Erik Ploeger
  2. F2C field types
  3. Wednesday, December 28 2016, 04:20 PM
  4.  Subscribe via email
Hello,

I'm using single line tekst field but when i input 0 (zero) in the field in the form it wil not save the article. When i enter something else it is not a problem. But i need to enter just a 0 (zero) in the single line field. Seems that f2c does not see 0 (zero) as a approved value and resets the field to empty. How can i do this without also inserting a . (dot)? Does someone have a solution?

Joomla: 3.6.5
J2C Pro: 6.15.0
References
  1. http://hogelandcup.nl/web/index.php/programma
Responses (6)
Julien Accepted Answer
Hi Erik,

I can't reproduce this on my machine. I can remember a similar question in the past, but I can't recall the answer anymore.....I thought it was a hosting/security issue, but I'm not sure....

Which PHP version are you running?

Can you send me the site as an Akeeba backup so I can verify it on my machine?
You can send the back-up to julien at opensourcedesign dot nl

best,
Julien
  1. more than a month ago
  2. F2C field types
  3. # 1
Erik Ploeger Accepted Answer
Thanks,

Just send you a mail with backup and php version. Hope you can help out.

Best regards,

Erik Ploeger.
  1. more than a month ago
  2. F2C field types
  3. # 2
Julien Accepted Answer
Hi Erik,

F2C does save the 0 value, that is not the issue here. The problem is in your template where you test if a field has a value. Your test is:

{if $PUNTEN}<td align="left">{$PUNTEN}</td>{/if}

Since Smarty takes 0 as not a value, your code will output nothing.
You have to change the test into this to include the 0 as a valid value:

{if $PUNTEN !== ""}<td align="left">{$PUNTEN}</td>{/if}

Now it will generate output for a 0 value as well.

best,
Julien
  1. more than a month ago
  2. F2C field types
  3. # 3
Erik Ploeger Accepted Answer
Dear Julien,

Thanks, but sadly it's not the awnser. The form is stil asking to put something in the field where the 0 (zero) is.
I've seen there are spaces in your solution, must they be there ore not?

Best Regards, Erik.
  1. more than a month ago
  2. F2C field types
  3. # 4
Julien Accepted Answer
Hi Erik,

You mention that the form is asking for input for the field. Is that when you save the article?
When I tested your site locally I did not see this behaviour.

Can you please send me credentials to your live site so I can see the situation there myself? Please send them to my e-mail address.

best,
Julien
  1. more than a month ago
  2. F2C field types
  3. # 5
Erik Ploeger Accepted Answer
Dear Julien,

Sorry:( , it does work perfectly on the template for 'standen' but this solution does not work for my other template 'programma'. I used the same solution but this template asks to fill in the cell where the 0 (zero) is put. On save this form gives the error. I can give you credentials to the site, but i wil need your ip address because otherwise admin tools wil rule you out as admin. This is a security matter. Thanks for the help sofar, i realy appriciate this!

Mvg, Erik.
  1. more than a month ago
  2. F2C field types
  3. # 6
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.