GetSimple Support Forum
Making GetSimple even more dummy (client) proof. - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Developer Discussions (http://get-simple.info/forums/forumdisplay.php?fid=8)
+--- Thread: Making GetSimple even more dummy (client) proof. (/showthread.php?tid=80)



Making GetSimple even more dummy (client) proof. - Zegnåt - 2009-08-19

As I often come across people that would like really simple webpages that just need to work I find GetSimple to be an interesting CMS to look at. The problem with most of these people is that they have no knowledge about anything at all.

Today is my first day of testing GetSimple and as one of the things I wanted to change the slug for the homepage, which is currently fixed on 'index'. I was a little disappointed when it told me I couldn't change it but I know some of my client would get completely frustrated by this. I tried to solve this problem by editting the associated line (#152) of edit.php. I made it as follows:
Code:
<input class="text short" type="text" id="post-uri" name="post-uri" value="<?php echo @$url ?>" <?php echo ($url=='index'?'disabled="disabled" ':''); ?>/></td>
It seems to work and looks exactly as I had pictured. However, for some reason once I have this change in place and I go to change the page it will tell me it couldn't submit any of the changes due to me having changed the slug. I am very certain I did no such thing and the field is disabled so I can't have done it accidentally (leaving out of consideration the fact I tested it multiple times).

Could someone test this piece of code for me and report their findings? Maybe I'm just constantly overlooking something.

I bet there are even more places that could be made more dummy proof. This does not mean the error messages can be removed, but it will add an extra layer of protection against stupidity.

Thanks for your time.


Making GetSimple even more dummy (client) proof. - ccagle8 - 2009-08-20

Zengat - I love it. This worked, but only when i changed it to readonly="readonly". This code will be included in the next release. Thank you!


Making GetSimple even more dummy (client) proof. - Zegnåt - 2009-08-20

ccagle8 Wrote:This worked, but only when i changed it to readonly="readonly".
Do you have any idea why it didn’t work with disabled="disabled"? Just curious. Good to hear you got it working in some way and even better to hear it will be implemented Big Grin


Making GetSimple even more dummy (client) proof. - ccagle8 - 2009-08-20

I've seen this problem before when coding (not GS). If a input field is shown as disabled, it returns a null value, no matter what is in it's value="" attribute.


Making GetSimple even more dummy (client) proof. - crashfellow - 2009-09-05

Because disabled to my knowledge sets an input box as null not an empty string.


Making GetSimple even more dummy (client) proof. - crashfellow - 2009-09-05

Found this in a search:
http://www.velocityreviews.com/forums/t67733-disabled-input-box-bug.html

'Its because, when u disable a text box, and u try to request its value it wont come. So instead of disabling it, make it readonly.'