Hello,
I'm a newbie with Xataface and PHP.
I have a form with two fields FieldA and FieldB.
I would like to change the attribute of FieldB (regex format) depending on the value of the FieldA.
How can i do that ?
Thanks for the response.
conditional field attribute
5 posts
• Page 1 of 1
conditional field attributeHello,
I'm a newbie with Xataface and PHP. I have a form with two fields FieldA and FieldB. I would like to change the attribute of FieldB (regex format) depending on the value of the FieldA. How can i do that ? Thanks for the response.
Re: conditional field attributeIf you want to do it on save, then you can use the beforeSave() trigger in the delegate class.
If you want to do it client side you could attach some javascript to your fields.
Re: conditional field attributeHello Shannah,
I tried to install a javascript onchange event handler to a field as you explain in "How to include custom javascripts and stylesheets in your application". I created an ApplicationDelegate.php file in the directory my_application/conf which contents function block__custom_javascripts(){ echo '<script src="javascripts.js" type="text/javascript" language="javascript"></script>'; } But when I refresh the site's page, I got a blank page with function block__custom_javascripts(){ echo ''; } print on the first line. What's the error I made ? Thanks
Re: conditional field attributeThe app delegate class needs to be a php class. You are missing the php open tags and the class declaration. Read up on delegate classes and the application delegate class for more details and examples.
Re: conditional field attributeThank you Steeve for DF and your quick answers.
I succeeded to do a javascript onchange event handler ! I'm less and less a newbie ! But I think, i'll be back later for some news questions.
5 posts
• Page 1 of 1
Who is onlineUsers browsing this forum: No registered users and 21 guests |